develooper Front page | perl.perl5.porters | Postings from April 2006

Re: [perl #33734] unpack fails on utf-8 strings

Thread Next
Marc Lehmann
April 28, 2006 09:04
Re: [perl #33734] unpack fails on utf-8 strings
Message ID:
On Thu, Apr 27, 2006 at 10:05:19PM -0700, Glenn Linderman via RT <> wrote:
> > I think Ton's semantics as incorporated into 5.9.x are right (or at least a
> > heck of a lot less wrong than current) but they change far more than I'm
> > comfortable with for maint.
> > I don't like this compromise, but it seems less likely to trigger new bugs
> > than either keeping the old behaviour, or entirely adopting Ton's changes.
> You produced some amazing magic with loadable Regexp work, to get Dave's 
> Regexp fixes available to maint, without actually changing maint, so 
> that people using 5.8.x could useh the fixed Regexp if they choose.  I 
> haven't looked at the detalis of how you did that, and I guess it might 
> still have some rough edges from the last I've read on the topic....
> But it makes me wonder if Ton's un/pack changes could be turned into a 
> loadable module for maint?
> use feature newpack;
> (I forget the syntax you used for the new regexp stuff)

It's probably not worth it: I think its important to fix unpack. Wetehr
documented or not, its buggy, because there is no official way to make it
work, except to rely on implementation-defined behaviour (namely that a
certain string is encoded internally as utf-8 or not, which can and does
change between different versions of perl).

However, wether it gets fixed with 5.9 or 5.8 is a matter of taste, and if
it breaks things (which I can't see why, as it would be rather broken to
rely on random internal behaviour, e.g. in modules), then it should simply
stay out of 5.8. People who want fixed behaviour can simply go to 5.10,
instead of a comparatively major effort of making this runtime-selectable
(and documenting and maintaining that stuff).

Just my thoughts...

                The choice of a
      -----==-     _GNU_
      ----==-- _       generation     Marc Lehmann
      ---==---(_)__  __ ____  __
      --==---/ / _ \/ // /\ \/ /
      -=====/_/_//_/\_,_/ /_/\_\      XX11-RIPE

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