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

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

Thread Next
From:
Roca, Ignasi
Date:
January 8, 2001 02:46
Subject:
RE: RV: [PATCH perl@8327] strings with \x{..} in the middle are corru pted
Message ID:
5930DC161690D2119667009027157547037399F7@madt009a.siemens.es
> > 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.

> $ ./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

Thread Next


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