develooper Front page | perl.perl5.porters | Postings from November 2010

Re: "perl: utf8.c:1997: Perl_swash_fetch: Assertion `klen <= sizeof(PL_last_swash_key)'failed." [5.12.1]

Thread Previous | Thread Next
From:
Reverend Chip
Date:
November 29, 2010 10:53
Subject:
Re: "perl: utf8.c:1997: Perl_swash_fetch: Assertion `klen <= sizeof(PL_last_swash_key)'failed." [5.12.1]
Message ID:
4CF3F6B0.7020003@gmail.com
On 11/29/2010 1:32 AM, demerphq wrote:
> The perl internals as general rule assume that you can read characters
> in utf8 just as you might with normal C strings.
>
> That is, that if the character you are reading starts at a safe
> position in memory that it can be read in its entirety.
>
> What you are saying is that this should not be the case, which
> essentially means we have to validate every character we read.

I was under the impression that there was more to utf8 string validation
than just checking the length markers of multibyte sequences.  If, in
context, that was the extent of it, then I have probably lost this argument.


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