Front page | perl.perl5.porters |
Postings from January 2012
Re: pack and ASCII
Thread Previous
|
Thread Next
From:
Leon Timmermans
Date:
January 11, 2012 04:10
Subject:
Re: pack and ASCII
Message ID:
CAHhgV8g16vkW2c1jeFQxPXOE-3xw6ERCT2f=xS7Dq3ofo2SDow@mail.gmail.com
On Wed, Jan 11, 2012 at 8:13 AM, Jesse Luehrs <doy@tozt.net> 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.
Leon
Thread Previous
|
Thread Next