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

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

Thread Next
April 5, 2003 00:28
[ANNOUNCE] Unicode::Normalize 0.21 and ::Collate 0.24 released
Message ID:


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


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,

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About