summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-07 07:08:15 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-07 07:08:15 +0000
commit3969a89698ec7136fcf0eb1062fdf63f0e7726f4 (patch)
treeabeba671289226d1cb9b5858d8acfdeba9a3cb58 /pp.c
parent154a3d541e7a9364fb47632cc34c63cdb1d8eda3 (diff)
downloadperl-3969a89698ec7136fcf0eb1062fdf63f0e7726f4.tar.gz
remove $^U dependent behaviors in runtime; chr() and sprintf('%c',...)
now return bytes all the way to 255, they will be transparently coerced (in future) to UTF-8 when they are used in operations involving other UTF-8 strings; C<use utf8> doesn't set $^U anymore p4raw-id: //depot/perl@5013
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp.c b/pp.c
index 9406a0b343..eb0522878d 100644
--- a/pp.c
+++ b/pp.c
@@ -2199,10 +2199,9 @@ PP(pp_chr)
char *tmps;
U32 value = POPu;
- SvUTF8_off(TARG); /* decontaminate */
(void)SvUPGRADE(TARG,SVt_PV);
- if (value >= 128 && PL_bigchar && !IN_BYTE) {
+ if (value > 255 && !IN_BYTE) {
SvGROW(TARG,8);
tmps = SvPVX(TARG);
tmps = (char*)uv_to_utf8((U8*)tmps, (UV)value);
@@ -2219,6 +2218,7 @@ PP(pp_chr)
tmps = SvPVX(TARG);
*tmps++ = value;
*tmps = '\0';
+ SvUTF8_off(TARG); /* decontaminate */
(void)SvPOK_only(TARG);
XPUSHs(TARG);
RETURN;