From: Jarkko Hietaniemi Date: Wed, 27 Mar 2002 22:29:30 +0000 (+0000) Subject: UTF-8 locale: need to open explicitly for bytes. X-Git-Tag: accepted/trunk/20130322.191538~27309 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a4089e06d5f9246f1e2f6612598055a38385f226;p=platform%2Fupstream%2Fperl.git UTF-8 locale: need to open explicitly for bytes. p4raw-id: //depot/perl@15558 --- diff --git a/ext/PerlIO/t/encoding.t b/ext/PerlIO/t/encoding.t index a8550d5..bba6628 100644 --- a/ext/PerlIO/t/encoding.t +++ b/ext/PerlIO/t/encoding.t @@ -16,7 +16,7 @@ my $utf = "utf$$"; my $fail1 = "fail$$"; my $russki = "koi8r$$"; -if (open(GRK, ">$grk")) { +if (open(GRK, ">:raw", $grk)) { # alpha beta gamma in ISO 8859-7 print GRK "\xe1\xe2\xe3"; close GRK or die "Could not close: $!"; @@ -34,7 +34,7 @@ if (open(GRK, ">$grk")) { close($i); } -if (open(UTF, "<$utf")) { +if (open(UTF, "<:raw", $utf)) { if (ord('A') == 193) { # EBCDIC # alpha beta gamma in UTF-EBCDIC Unicode (0x3b1 0x3b2 0x3b3) print "not " unless eq "\xb4\x58\xb4\x59\xb4\x62"; @@ -58,7 +58,7 @@ if (open(UTF, "<$utf")) { close($i); } -if (open(GRK, "<$grk")) { +if (open(GRK, "<:raw", $grk)) { print "not " unless eq "\xe1\xe2\xe3"; print "ok 8\n"; close GRK;