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

Re: RV: [PATCH perl@8327] strings with \x{..} in the middle are corru pted

From:
Jarkko Hietaniemi
Date:
January 5, 2001 06:37
Subject:
Re: RV: [PATCH perl@8327] strings with \x{..} in the middle are corru pted
Message ID:
20010105083654.J8075@chaos.wustl.edu
> print "ok \xFF\x{FF}\n" & "ok 22\n";
> 
> > and add it to the op/bop.t script ?

Hmmm.  It would seem that even after your patch we still have a bug
somewhere in there.  Notice how the last combination produces illegal
UTF-8 *sigh*.  <...testing...> It would seem that your patch does not
change anything (for the below cases) in an ASCII machine.

$ ./perl -Ilib -MDevel::Peek -e 'print Dump("\xFF\xFF")'
SV = PV(0x140025310) at 0x140001af0
  REFCNT = 1
  FLAGS = (POK,READONLY,pPOK)
  PV = 0x1400013a0 "\377\377"\0
  CUR = 2
  LEN = 3
$ ./perl -Ilib -MDevel::Peek -e 'print Dump("\x{FF}\x{FF}")'
SV = PV(0x140025310) at 0x140001af0
  REFCNT = 1
  FLAGS = (POK,READONLY,pPOK,UTF8)
  PV = 0x1400013a0 "\303\277\303\277"\0
  CUR = 4
  LEN = 5
$ ./perl -Ilib -MDevel::Peek -e 'print Dump("\xFF\x{FF}")'
SV = PV(0x140025310) at 0x140001af0
  REFCNT = 1
  FLAGS = (POK,READONLY,pPOK,UTF8)
  PV = 0x1400013a0 "\303\277\303\277"\0
  CUR = 4
  LEN = 5
$ ./perl -Ilib -MDevel::Peek -e 'print Dump("\x{FF}\xFF")'  
SV = PV(0x140025310) at 0x140001af0
  REFCNT = 1
  FLAGS = (POK,READONLY,pPOK,UTF8)
  PV = 0x1400013a0 "\303\277\377"\0
  CUR = 3
  LEN = 4
$ 

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About