On 09/01/2013 10:47 AM, Victor Efimov wrote: > > 2013/9/1 Leon Timmermans <fawaka@gmail.com <mailto:fawaka@gmail.com>> > > > $! is inherently a piece of text, not piece of binary data. As such, > it makes perfect sense to treat it as such an automatically decode > it. The same is not necessarily true for your other examples. > > > btw, interesting that $^E is not affected by this change, i.e when $! is > same as $^E (I tested on linux only), $^E does not have utf-8 flag, > while $! has. > I've been wondering myself what should happen with $^E, and I believe the two should be made consistent. Some other thoughts I've had about this issue. The commit did not break the ISO 646 7-bit codings, as the behavior is unchanged for those. Those encodings must not be very important nor have been for quite some time, as it does not appear that Encode supports them. We could have a feature automatically turned on in v5.20. I'll call it 'errno' for now ('mauve' having been taken ;) ). Without it being on, $! works as it did in <=v5.18. Within its scope Perl attempts to decode $! as best it can, autoloading Encode and trying to determine the locale using nl_langinfo() if available. This may be a crazy idea; but I thought I'd put it out there to stimulate discussionThread Previous | Thread Next