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

Re: pack and ASCII

Thread Previous | Thread Next
From:
Eric Brine
Date:
January 12, 2012 10:13
Subject:
Re: pack and ASCII
Message ID:
CALJW-qFsT2E2aJNpzWFAiOuqe+1TGB9GxVBW=b4jL2Z1MWpRSQ@mail.gmail.com
2012/1/12 Torsten Förtsch <torsten.foertsch@gmx.net>

> On Thursday, 12 January 2012 13:28:57 demerphq wrote:
> > I consider the utf8 flag being ON here to be both a regression, and a
> > bug. IMO the output of pack "A" should NEVER have the utf8 flag set.
>
> I am using Perl for 14 years now and I was really really surprised to read
> here that the output of C<pack> might have the UTF8 flag set. I have always
> seen it as a tool to construct structures to pass to C level or to parse
> them.
>

Then you must not be familiar with U and W which specifically create
characters above 255.


> Then I asked a colleague what he thinks. And he was surprised as much.
>

Yet neither of you have ever had a problem with this possibility.

>
> Especially I am surprised that not only "A" can return utf8 strings but
> also
> "a" (at least with 5.12.3):
>

Which is very useful for interacting with the most common OS out there.

>
> To me as a mere user this feels like a bug.
>

Why? You've admitted you were surprised by this, which means it has never
caused you any problem.

- eRIC

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