in reply to perlpacktut "packing text" example and Unicode
I'm using Windows XP Service Pack 3 with Active Perl 5.8.9.
Works fine at least as far back as ActivePerl 5.10.1 build 1007 (the oldest I have).
>perl -E"$_ = qq{execu\x{e7}\x{e3}o}; utf8::downgrade($_); say $_ eq u +npack('A*', $_) ?1:0" 1 >perl -E"$_ = qq{execu\x{e7}\x{e3}o}; utf8::upgrade($_); say $_ eq unp +ack('A*', $_) ?1:0" 1
IIRC, lots of pack/unpack fixes concerning non-byte strings went into 5.10.
|
|---|