develooper Front page | perl.perl5.porters | Postings from April 2003

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

Thread Next
From:
SADAHIRO Tomoyuki
Date:
April 5, 2003 00:28
Subject:
[ANNOUNCE] Unicode::Normalize 0.21 and ::Collate 0.24 released
Message ID:
20030405172759.9CB6.BQW10602@nifty.com

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


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About