nayakgi / perl-compiler

Automatically exported from code.google.com/p/perl-compiler
Other
0 stars 0 forks source link

uni/tr_7jis.t fails due to encoding? #354

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I can't embed this program inline cause it doesn't work with escape chars in 
the file.

$>perl t/CORE/uni/tr_7jis.t                           
ok 1 s/// # hiragana -> katakana

$>t/CORE/uni/tr_7jis.bin 
not ok 1 s/// # hiragana -> katakana

Original issue reported on code.google.com by todd.e.rinaldo on 7 Jul 2014 at 8:43

GoogleCodeExporter commented 9 years ago
use encoding 'iso-2022-jp';

my $first = chr(12353);

print "ok - same chr\n" if $first eq "^[$B$!^[(B";
print "ok - same ord\n" if ord($first) eq ord("^[$B$!^[(B");
print "ok - regexp using variable\n" if $first =~ m/^$first/;
print "ok - regexp using special characters\n" if $first =~ m/^^[$B$!^[(B/;

exit;

Original comment by nicolas....@gmail.com on 7 Jul 2014 at 9:12

GoogleCodeExporter commented 9 years ago
uncompiled:

ok - same chr
ok - same ord
ok - regexp using variable
ok - regexp using special character

compiled:

ok - same chr
ok - same ord
ok - regexp using variable

Original comment by nicolas....@gmail.com on 7 Jul 2014 at 9:13

GoogleCodeExporter commented 9 years ago
here is the file used for that test

Original comment by nicolas....@gmail.com on 7 Jul 2014 at 9:17

Attachments:

GoogleCodeExporter commented 9 years ago
> perl jp.t
ok - same chr
ok - same ord
ok - regexp using variable
ok - regexp using special characters

vs

> perlcc -r jp.t
ok - same chr
ok - same ord
ok - regexp using variable

Original comment by nicolas....@gmail.com on 7 Jul 2014 at 9:18

GoogleCodeExporter commented 9 years ago
wontfix. use encoding 'iso-2022-jp'; is deprecated

perl5.14.4d-nt: B.xs:1742: XS_B__GV_NAME: Assertion `((((_gvname_hek)->sv_flags 
& (0x00004000|0x00008000)) == 0x00008000) && (((svtype)((_gvname_hek)->sv_flags 
& 0xff)) == SVt_PVGV || ((svtype)((_gvname_hek)->sv_flags & 0xff)) == 
SVt_PVLV))' failed.
 Aborted

Original comment by reini.urban on 7 Jul 2014 at 10:37