summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorSimon Cozens <simon@netthink.co.uk>2000-08-01 02:37:02 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-08-01 03:35:24 +0000
commitaaa68c4a88ea4a62f62819baf4cacc0ca679c5fa (patch)
treeb982a426b8ef603bc6074b2fb44b1ed803e38cc1 /pp.c
parent3f8b881759d590aaf8acece41144118d426080c3 (diff)
downloadperl-aaa68c4a88ea4a62f62819baf4cacc0ca679c5fa.tar.gz
Make chr() for values >127 to create utf8 when under utf8.
Subject: Re: uft8/chr() Message-ID: <slrn8ocdud.19l.simon@justanother.perlhacker.org> p4raw-id: //depot/perl@6475
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 988619f34f..1621df5041 100644
--- a/pp.c
+++ b/pp.c
@@ -2206,7 +2206,7 @@ PP(pp_chr)
(void)SvUPGRADE(TARG,SVt_PV);
- if (value > 255 && !IN_BYTE) {
+ if ((value > 255 && !IN_BYTE) || (value & 0x80 && PL_hints & HINT_UTF8) ) {
SvGROW(TARG, UTF8_MAXLEN+1);
tmps = SvPVX(TARG);
tmps = (char*)uv_to_utf8((U8*)tmps, (UV)value);