perl-unicode

[ANNOUNCE] Unicode::Normalize 0.21 and ::Collate 0.24 released

2003-04-05 01:30:05

Hello.

I released new versions of Unicode::Normalize and ::Collate.

http://search.cpan.org/author/SADAHIRO/Unicode-Normalize-0.21/
http://search.cpan.org/author/SADAHIRO/Unicode-Collate-0.24/


STORY

The initial BEGIN blocks are changed from this
(*** is either of 'Normalize' or 'Collate')

    if (ord("A") == 193) {
        die "Unicode::*** not ported to EBCDIC\n";
    }

to this.

    unless ("A" eq pack('U', 0x41) || "A" eq pack('U', ord("A"))) {
        die "Unicode::*** cannot stringify a Unicode code point\n";
    }

In a perl for ASCII, both ("A" eq pack('U', 0x41))
and ("A" eq pack('U', ord("A"))) must be true
while, in a perl for EBCDIC, either should be false;

As I'm not cartain whether is true for EBCDIC,
added the following tweak.

(1) If the former were true, stringification of Unicode code points
could be carried out by pack('U*') as well as one for ASCII;

(2) elsif the latter were true, Unicode code points (less than 256)
should be translated into native code points for EBCDIC;

(3) else, any further work should be abandoned.

If a test would failed for EBCDIC,
the code might be broken;
as well as the test itself might be broken.

Thank you,
SADAHIRO Tomoyuki