--- SADAHIRO Tomoyuki <[EMAIL PROTECTED]> wrote:
>
>
> On Wed, 5 Oct 2005 08:12:11 -0700 (PDT), rajarshi
> das
> <[EMAIL PROTECTED]> wrote
>
> > Hi,
> > I made the following change to utf8.c on EBCDIC:
> >
> > > *** /u/isldev2/perl-5.8.6/utf8.c Fri Sep 30
> 02:26:42
> > > 2005
> > > --- utf8.c.modified Tue Oct 4 03:37:46 2005
> > > ***************
> > > *** 193,198 ****
> > > --- 193,201 ----
> > > if (!UTF8_IS_START(u))
> > > return 0;
> > > + #ifdef EBCDIC
> > > + u = NATIVE_TO_UTF(u);
> > > + #endif
> > > len = UTF8SKIP(s);
> > >
> > > This change, along with certain modifications to
> the
> > > test case t/uni/class.t, have fixed all the
> failures
> > > in t/uni/class.t on perl-5.8.6.
>
> However I think the success of some tests in
> t/uni/class.t
> is a pretense since t/uni/class.t seems to have a
> bug on EBCDIC.
> (and maybe another uncertain regex bug hiding ...)
>
> For example the first test in t/uni/class.t is not
> portable to EBCDIC:
>
> my $str = join "", map chr($_), 0x20 .. 0x6F;
I changed it with :
if (ord('A') == 193) {
$str = join "", map chr($_), 0x40, 0x5A, 0x7F, 0x7B,
0x5B, 0x6C, 0x50, 0x7D, 0x4D, 0x5D, 0x5C, 0x4E, 0x6B,
0x60, 0x4B, 0x61, 0xF0 .. 0xF9, 0x7A, 0x5E, 0x4C,
0x7E, 0x6E, 0x6F, 0x7C, 0xC1 .. 0xC9, 0xD1 .. 0xD9,
0xE2 .. 0xE9, 0xAD, 0xE0, 0xBD, 0x5F, 0x6D, 0x79, 0x81
.. 0x89, 0x91 .. 0x96;
}
else {
$str = join "", map chr($_), 0x20 .. 0x6F;
}
And then the all the tests pass.
Thanks,
Rajarshi.
>
> # make sure it finds built-in class
> is(($str =~ /(\p{Letter}+)/)[0],
> 'ABCDEFGHIJKLMNOPQRSTUVWXYZ');
>
> In EBCDIC, the code value for 'A' is 0xC1, instead
> of 0x41 in ASCII.
> Thus $str here doesn't contain 'A' on EBCDIC
> platform.
>
> This test may be cut down as below.
>
> is(("\x4E" =~ /(\p{Letter}+)/)[0], 'N');
>
>
> If this test results in "true", the result means
> that
>
> "+" =~ /(\p{Letter}+)/ # cf. "\x4E" eq "+"
> in EBCDIC
>
> is incorrectly true on EBCDIC platform, doesn't it?
>
>
> Regards,
> SADAHIRO Tomoyuki
>
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com