From: Jarkko Hietaniemi Date: Wed, 13 Feb 2002 02:37:31 +0000 (+0000) Subject: Duh. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e87322b2e8419defee882ceb696c003953500063;p=p5sagit%2Fp5-mst-13.2.git Duh. p4raw-id: //depot/perl@14668 --- diff --git a/pp_pack.c b/pp_pack.c index 25cd592..b66d682 100644 --- a/pp_pack.c +++ b/pp_pack.c @@ -449,7 +449,7 @@ PP(pp_unpack) if (checksum) { while (len-- > 0 && s < strend) { STRLEN alen; - auint = UNI_TO_NATIVE(utf8n_to_uvchr((U8*)s, strend - s, &alen, 0)); + auint = NATIVE_TO_UNI(utf8n_to_uvchr((U8*)s, strend - s, &alen, 0)); along = alen; s += along; if (checksum > bits_in_uv) @@ -463,7 +463,7 @@ PP(pp_unpack) EXTEND_MORTAL(len); while (len-- > 0 && s < strend) { STRLEN alen; - auint = UNI_TO_NATIVE(utf8n_to_uvchr((U8*)s, strend - s, &alen, 0)); + auint = NATIVE_TO_UNI(utf8n_to_uvchr((U8*)s, strend - s, &alen, 0)); along = alen; s += along; sv = NEWSV(37, 0); @@ -1558,7 +1558,7 @@ PP(pp_pack) case 'U': while (len-- > 0) { fromstr = NEXTFROM; - auint = NATIVE_TO_UNI(SvUV(fromstr)); + auint = UNI_TO_NATIVE(SvUV(fromstr)); SvGROW(cat, SvCUR(cat) + UTF8_MAXLEN + 1); SvCUR_set(cat, (char*)uvchr_to_utf8((U8*)SvEND(cat),auint) - SvPVX(cat)); diff --git a/t/op/length.t b/t/op/length.t index 763a8c1..d1cfda1 100644 --- a/t/op/length.t +++ b/t/op/length.t @@ -43,7 +43,7 @@ print "ok 3\n"; if (ord('A') == 193) { printf "#%vx for 0xFF\n",$a; - print "not " unless $a eq "\x80\x45" && length($a) == 2; + print "not " unless $a eq "\x8b\x73" && length($a) == 2; } else {