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:07
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:02:32PM +0200, Marc Lehmann wrote:

> The same is true for many XS modules: in older versions of perl, SvPV gave
> you the 8-bit version of a scalar, but in current versions, it randomly
> gives you either 8-bit or utf-8 encoded. SvPV was renamed to SvPVbyte.
> Both of those gratitiously backwards-incompatible changes break lots of
> existing code.
> And the problem is that those bugs are not considered bugs but features.

I certainly consider this one a bug.

I didn't create the release that messed this up, and didn't realise the
implications of the change until some time after it happened.
You might consider me slow for this.

> I wonder why it is ok to break large amounts of perl and xs code silently,
> without even documenting how to fix it[1], while at the same time 5.10
> introduced "use feature" to shield against possible breakage with far less of
> an impact then the changes above.

Problem is now that I can't see how to fix it without breaking other code that
plays by the different, new, rules.

Nicholas Clark

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