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

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

Thread Previous | Thread Next
June 18, 2013 15:36
Re: [perl #113824] Regexp error messages are not UTF8-clean
Message ID:
On 18 June 2013 15:29, Father Chrysostomos via RT
<> wrote:
> 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.

Very nice idea! ++FC.


perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About