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

[perl #113824] Regexp error messages are not UTF8-clean

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
June 18, 2013 13:30
Subject:
[perl #113824] Regexp error messages are not UTF8-clean
Message ID:
rt-3.6.HEAD-2552-1371562192-1566.113824-15-0@perl.org
On Tue Jun 18 06:17:15 2013, sprout wrote:
> All our printf-style functions *do* support utf8, but just not as a
> separate flag.  The input must be a HEK or SV.  Look for instances of
> HEKf and SVf in the perl source.
> 
> Now, it has just occurred to be that it would not be at all hard to add
> support for utf8 char*s.  We have pretty much infinite space in %-p
> formats, so we can define %-4p to whatever we want.
> 
> The latter would not be necessary for fixing this bug, but it may be a
> good thing to do anyway, and it might turn out to be the simplest way to
> fix this bug.

And this is what it would look like in practice;

Perl_croak("Couldn't twiggle the twoggle in \"%"UTF8f"\"", is_utf8, s);

UTF8f could take two arguments, the first being a boolean.  That would
be the most useful way to implement it.

-- 

Father Chrysostomos


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

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