develooper Front page | perl.perl5.porters | Postings from January 2012

Re: pack and ASCII

Thread Previous | Thread Next
Leon Timmermans
January 11, 2012 04:10
Re: pack and ASCII
Message ID:
On Wed, Jan 11, 2012 at 8:13 AM, Jesse Luehrs <> wrote:
>> If you have code that requires a UTF8=0 string specifically, it is buggy.
>> Specifically, it suffers from the Unicode bug. You are probably using SvPV
>> without looking at the SvUTF8. The solution is simple: Use SvPVbyte instead.
> There has to be some point when code can assume that it has a byte
> string. What Leon is saying is that it's a lot more useful for pack to
> use SvPVbyte itself automatically, since pack is typically used for
> things like binary protocols and file formats, which are usually defined
> in terms of bytes, not characters.

Yes, this.


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