develooper Front page | perl.perl5.porters | Postings from March 2007

Re: the utf8 flag (was Re: [perl #41527] decode_utf8 sets utf8 flag on plain ascii strings)

Thread Previous | Thread Next
Nicholas Clark
March 30, 2007 05:31
Re: the utf8 flag (was Re: [perl #41527] decode_utf8 sets utf8 flag on plain ascii strings)
Message ID:
On Fri, Mar 30, 2007 at 02:18:14PM +0200, Marc Lehmann wrote:
> On Fri, Mar 30, 2007 at 01:07:22PM +0100, Nicholas Clark <> wrote:
> > > And the problem is that those bugs are not considered bugs but features.
> > 
> > I certainly consider this one a bug.
> So fix it. It is easy to do, and I documented it years ago (during 5.6).

"this one" that I was confident is a bug is the change of meaning on SvPV()
And in turn what I'm not confident about is the fix.

> Besides, without any doubt, the code that relies on psuedo-random
> behaviour is certainkly in the minority. The amount of code in the wild
> that relies on "C" having 5.5 semantics is much larger. I doubt _anybody_
> except me (or at leats not very many people) understands that he has to
> downgrade scalars before passing them into unpack to decode structures.

I don't know enough about "C" in pack offhand to know what the right thing to
do is.

I don't like anything Perl space that lets the abstraction leak, and "C" is
one of them.

The third thing that you didn't mention which I consider distinct from the two
behaviours you did is that the encoding effects how regexps match, and

Nicholas Clark

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