summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-01-16 20:36:23 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-01-16 20:36:23 +0000
commit88632417a970dff8f92718b0800b1aa1400cb4ae (patch)
treeea66b4eab7dfc6a1a4ebdd064c01f1f0095bcfe1 /doio.c
parentcaf774a6b47c93401a4581fab332b04b560c89d5 (diff)
downloadperl-88632417a970dff8f92718b0800b1aa1400cb4ae.tar.gz
Fix 'use encoding' I/O for code points 0x80..0xFF;
code changes from Inaba Hiroto; test tweaks by jhi. p4raw-id: //depot/perl@18496
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/doio.c b/doio.c
index e23a2ca7d3..3ae3764d58 100644
--- a/doio.c
+++ b/doio.c
@@ -1268,7 +1268,8 @@ Perl_do_print(pTHX_ register SV *sv, PerlIO *fp)
default:
if (PerlIO_isutf8(fp)) {
if (!SvUTF8(sv))
- sv_utf8_upgrade(sv = sv_mortalcopy(sv));
+ sv_utf8_upgrade_flags(sv = sv_mortalcopy(sv),
+ SV_GMAGIC|SV_UTF8_NO_ENCODING);
}
else if (DO_UTF8(sv)) {
if (!sv_utf8_downgrade((sv = sv_mortalcopy(sv)), TRUE)