I wrote: > It provides a useful facility >that's otherwise difficult to achieve: errno-based messages that are >responsive to "use locale" in the same way as $!. Actually it's not quite the same, because there's an encoding issue. In scope of "use locale", my_strerror() returns a string encoded in the locale's charset. $! uses a dodgy heuristic to sometimes decode this. As a CPAN author, it'd be nice to have an API function that shows what would go into $! for a given errno. It'd have to return an SV, or operate by writing to a supplied SV. Currently the behaviour would be my_strerror() plus dubious setting of SvUTF8. As a core coder and general Perl programmer, it'd be nice to have proper string decoding on $!. It should be decoded based on the actual character encoding of the locale that supplied the string, not just a guess. It should be decoded regardless of what the encoding is, not only if it's UTF-8. -zeframThread Previous | Thread Next