summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2001-08-14 23:23:27 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2001-08-15 03:16:14 +0000
commit2da16753ddb193e398c5ed0181f9c876d7891043 (patch)
treee7a18dfbba90e4be4cb587051bab7b53d3ffafa4 /doio.c
parentb45292c6482400eb775bd9f7db88e431e8adad0e (diff)
downloadperl-2da16753ddb193e398c5ed0181f9c876d7891043.tar.gz
Warning incorrectly reported without -w
Message-ID: <20010814212327.A1919@rafael> p4raw-id: //depot/perl@11673
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/doio.c b/doio.c
index a20d4e2fd0..0309e2a4c8 100644
--- a/doio.c
+++ b/doio.c
@@ -1222,7 +1222,9 @@ Perl_do_print(pTHX_ register SV *sv, PerlIO *fp)
sv_utf8_upgrade(sv = sv_mortalcopy(sv));
}
else if (DO_UTF8(sv)) {
- if (!sv_utf8_downgrade((sv = sv_mortalcopy(sv)), TRUE)) {
+ if (!sv_utf8_downgrade((sv = sv_mortalcopy(sv)), TRUE)
+ && ckWARN(WARN_UTF8))
+ {
Perl_warner(aTHX_ WARN_UTF8, "Wide character in print");
}
}