Gisle Aas <[EMAIL PROTECTED]> writes:

>  And would it not be much faster to do:
>    pack("L*", unpack("U*", $string));
>    pack("V*", unpack("U*", $string));
>    pack("N*", unpack("U*", $string));

Forget that.  unpack('U*', ...) is (by design?) broken.

perl -le 'print for unpack("U*", chr(196) . chr(172) . chr(300))'  # prints 196, 172, 
perl -le 'print for unpack("U*", chr(196) . chr(172))'             # prints 300

If we really want unpack("U*", ...) to behave this way, then I think
there should be some other specifier to unpack characters directly.
We have not used "W" yet?

There ought to be a better way than:

    map ord, split //, $string;


Reply via email to