summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-04-04 18:56:15 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-04-04 18:56:15 +0000
commitae79846703a543a04b4fe449abfd6b1e08a9e149 (patch)
tree59573ff06500f775bc65ae7de289abbf3153dfbd /doio.c
parent4a1add9022ee415d25c2a738be3ef391af77dfef (diff)
downloadperl-ae79846703a543a04b4fe449abfd6b1e08a9e149.tar.gz
Downgrade "Wide character in print" to a warning.
p4raw-id: //depot/perlio@9549
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/doio.c b/doio.c
index f6566bb521..631149db41 100644
--- a/doio.c
+++ b/doio.c
@@ -1204,8 +1204,11 @@ Perl_do_print(pTHX_ register SV *sv, PerlIO *fp)
if (!SvUTF8(sv))
sv_utf8_upgrade(sv = sv_mortalcopy(sv));
}
- else if (DO_UTF8(sv))
- sv_utf8_downgrade((sv = sv_mortalcopy(sv)), FALSE);
+ else if (DO_UTF8(sv)) {
+ if (!sv_utf8_downgrade((sv = sv_mortalcopy(sv)), TRUE)) {
+ Perl_warner(aTHX_ WARN_UTF8, "Wide character in print");
+ }
+ }
tmps = SvPV(sv, len);
break;
}