This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
use :raw to avoid interference from PERL_UNICODE when creating test data
authorTony Cook <tony@develop-help.com>
Mon, 19 Sep 2011 05:23:44 +0000 (15:23 +1000)
committerTony Cook <tony@develop-help.com>
Mon, 19 Sep 2011 05:23:44 +0000 (15:23 +1000)
986a805c added dist/IO/t/io_utf8argv.t which creates a utf-8 test file
from raw bytes.  When PERL_UNICODE was set the bytes were encoded as
utf-8, so producing a double-encode file.

Create the file with :raw to avoid that.

dist/IO/t/io_utf8argv.t

index c97c260..a902eaf 100644 (file)
@@ -13,7 +13,7 @@ use utf8;
 
 plan(tests => 2);
 
-open my $fh, ">", 'io_utf8argv';
+open my $fh, ">:raw", 'io_utf8argv';
 print $fh
    "\xce\x9c\xe1\xbd\xb7\xce\xb1\x20\xcf\x80\xe1\xbd\xb1\xcf\x80\xce".
    "\xb9\xce\xb1\x2c\x20\xce\xbc\xe1\xbd\xb0\x20\xcf\x80\xce\xbf\xce".