in reply to Hex conversion

Most interpretations I come up with for "hex format" depend on the bytes of the string not the characters so whether your string is encode in UTF-8 or not probably has no bearing. However, whether Perl thinks your string is UTF-8 encoded or not might have a bearing, depending what you do with it.

But some quick testing shows that:

my $hex= unpack "H*", $string;
works fine for all strings (whether in UTF-8 or not and whether or not Perl thinks they are UTF-8 or not) under Perl 5.6. I doubt that particular case changed in Perl 5.8 but I haven't had a reason to install that yet so I can't easily test.

                - tye