develooper Front page | perl.perl5.porters | Postings from October 2000

\x{...} is confused

Thread Next
Jarkko Hietaniemi
October 29, 2000 10:57
\x{...} is confused
Message ID:
./perl -Ilib -MDevel::Peek -we '$x="\x{100}\x{80}";print Dump($x)'
SV = PV(0x140001c80) at 0x140013cb8
  REFCNT = 1
  PV = 0x140001038 "\304\200\200"\0
  CUR = 3
  LEN = 4

The \x{100} works right but the \x{80} doesn't.

I think that in general it would be clearer if \x{} (with braces)
would *always* produce UTF-8 (even when < 0x80), ditto for vXXX.
(This idea has been suggested several times, so I'm not claiming
having invented anything awfully original here.)

$jhi++; #
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

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