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:
Roca, Ignasi
Date:
January 8, 2001 03:55
Subject:
RE: RV: [PATCH perl@8327] strings with \x{..} in the middle are corru pted
Message ID:
5930DC161690D211966700902715754703781533@madt009a.siemens.es
> On Mon, Jan 08, 2001 at 11:43:39AM +0100, Roca, Ignasi wrote:
> > > > 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.
> > In my opinion the patch should fix somethink like 
> > $./perl -Ilib -MDevel::Peek -e 'print Dump("\xFF\xFF\x{FF}")'
> > either in ASCII machine. Can anybody try the obove in a ASCII machine
> > without the patch to see the result.
> 
	Running /usr/local/perl-5.7.0@8229/bin/perl:
	SV = PV(0x8158cc8) at 0x814cc98
	  REFCNT = 1
	  FLAGS = (POK,READONLY,pPOK,UTF8)
	  PV = 0x8159f40 "\377\377\303\277"\0
	  CUR = 4
	  LEN = 5
	Running /usr/local/perl-5.7.0@8267/bin/perl:
	SV = PV(0x815a878) at 0x81444d8
	  REFCNT = 1
	  FLAGS = (POK,READONLY,pPOK,UTF8)
	  PV = 0x8151768 "\303\277\0\277\303\277"\0
	  CUR = 6
	  LEN = 7
	Running /usr/local/perl-5.7.0@8279/bin/perl:
	SV = PV(0x815a4c4) at 0x814b400
	  REFCNT = 1
	  FLAGS = (POK,READONLY,pPOK,UTF8)
	  PV = 0x815acc0 "\303\277\0\277\303\277"\0
	  CUR = 6
	  LEN = 7
	Running /usr/local/perl-5.7.0@8301/bin/perl:
	SV = PV(0x815a564) at 0x814b4a0
	  REFCNT = 1
	  FLAGS = (POK,READONLY,pPOK,UTF8)
	  PV = 0x815ad60 "\303\277\0\277\303\277"\0
	  CUR = 6
	  LEN = 7
	Running /usr/local/perl-5.7.0@8327/bin/perl:
	SV = PV(0x815a1c4) at 0x814b100
	  REFCNT = 1
	  FLAGS = (POK,READONLY,pPOK,UTF8)
	  PV = 0x815a9c0 "\303\277\0\277\303\277"\0
	  CUR = 6
	  LEN = 7
	Running /usr/local/perl-5.7.0@8344/bin/perl:
	SV = PV(0x815a224) at 0x814b160
	  REFCNT = 1
	  FLAGS = (POK,READONLY,pPOK,UTF8)
	  PV = 0x815aa20 "\303\277\303\277\303\277"\0
	  CUR = 6
	  LEN = 7

	-- 
	andreas


So, we can see that the problem exists also in ASCII machine up perl@8267
and that my patch solves the problem.

I suggest to add a test like this one to the bop.t

Thanks to all.


>  



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