On Wed, May 01, 2013 at 04:32:07PM +0200, demerphq wrote: > It used to be nice and safe to do this: > > print unpack("H*", $_),"\n"; # lets see what the string looks like in the raw. > > > This is no longer an effective debugging technique. It will NOT tell > you what your string looks like. It takes a "daddy knows best" > attitude and tries to do the right thing depending on whether the data > is utf8 or the data is not. Which means that this: > > perl -le'unpack "H*", "\x{DF}\x{100}"' > > Produces completely different results depending on which Perl you are > on. On older perls it produces a relatively useful: > > c39fc480 Add U0: $ ./perl -le'print unpack "U0H*", "\x{DF}\x{100}"' c39fc480 $ perl5.8.9 -le'print unpack "U0H*", "\x{DF}\x{100}"' c39fc480 (apparently today I am supposed to be observing the public holiday. Whether I want to or not) Nicholas ClarkThread Previous | Thread Next