summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-10-17 14:11:31 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-17 14:11:31 +0000
commit4b3603a49f6eac34b6cdb154bf3bd8a8f5240085 (patch)
treec47ff797022544402daab349559cdfef2ac44450 /doio.c
parent5de2853538d2396ad34f218ecc3a13db805f8d24 (diff)
downloadperl-4b3603a49f6eac34b6cdb154bf3bd8a8f5240085.tar.gz
On output try to downgrade to bytes, croak if impossible,
from Simon Cozens. This means that outputting >255 UTF8 is impossible. Consider this as a strong incentive to get the I/O disciplines implemented. p4raw-id: //depot/perl@7355
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/doio.c b/doio.c
index 2f78bc9509..52dfd6db7d 100644
--- a/doio.c
+++ b/doio.c
@@ -1186,6 +1186,9 @@ Perl_do_print(pTHX_ register SV *sv, PerlIO *fp)
}
/* FALL THROUGH */
default:
+ /* XXX Fix this when the I/O disciplines arrive. XXX */
+ if (DO_UTF8(sv))
+ sv_utf8_downgrade(sv, FALSE);
tmps = SvPV(sv, len);
break;
}