develooper Front page | perl.perl5.porters | Postings from August 2013

[perl #119499] $! returned with UTF-8 flag under UTF-8 locales only under 5.19.2+

Thread Previous | Thread Next
From:
Victor Efimov via RT
Date:
August 29, 2013 08:15
Subject:
[perl #119499] $! returned with UTF-8 flag under UTF-8 locales only under 5.19.2+
Message ID:
rt-3.6.HEAD-1873-1377764105-1426.119499-15-0@perl.org

On Wed Aug 28 23:40:08 2013, sprout wrote:
> 
> So now, $! may or may not be encoded, and you have to way of telling
> reliably without doing the same environment checks that perl itself did
> internally before deciding to decode $! itself.
> 

Small corrections:

a) Actually there is a way: check is_utf8($!) flag (which is not good
because is_utf8 marked as danger, and it's documented you cant distinct
characters from bytes with this flag)

b) Current fix does not do environment checks, it just tries to do UTF-8
validity check
http://perl5.git.perl.org/perl.git/commitdiff/1500bd919ffeae0f3252f8d1bb28b03b043d328e



---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=119499

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About