読者です 読者をやめる 読者になる 読者になる

Perl 5.12 から \N{ ... } は UTF-8 の内部表現を強制する

\N{...} now compiles better, always forces UTF-8 internal representation

http://perldoc.perl.org/perl5120delta.html#Internal-Changes

% cd ~/perl5/perlbrew/perls

% perl-5.10.1/bin/perl -MDevel::Peek -e 'Dump "\N{U+c2}"'
SV = PV(0x831b410) at 0x831d208
  REFCNT = 1
  FLAGS = (POK,READONLY,pPOK)
  PV = 0x8330af8 "\302"\0
  CUR = 1
  LEN = 4

% perl-5.12.5/bin/perl -MDevel::Peek -e 'Dump "\N{U+c2}"'
SV = PV(0x9add130) at 0x9aee558
  REFCNT = 1
  FLAGS = (POK,READONLY,pPOK,UTF8)
  PV = 0x9af1db8 "\303\202"\0 [UTF8 "\x{c2}"]
  CUR = 2
  LEN = 4