in reply to Decode XML &#xxxx; entities
Note that the first result does not have the utf-8 flag on, but for Perl this does not matter if a codepoint < 256 is internally encoded as latin1 or utf8.use HTML::Entities qw(decode_entities); use Devel::Peek; Dump decode_entities "ü"; Dump decode_entities "€"; __END__ SV = PV(0x5060c8) at 0x5051e8 REFCNT = 1 FLAGS = (TEMP,POK,pPOK) PV = 0x510920 "\374"\0 CUR = 1 LEN = 16 SV = PV(0x5060c8) at 0x5051e8 REFCNT = 1 FLAGS = (TEMP,POK,pPOK,UTF8) PV = 0x510920 "\342\202\254"\0 [UTF8 "\x{20ac}"] CUR = 3 LEN = 16
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Decode XML &#xxxx; entities
by saintmike (Vicar) on Dec 04, 2007 at 21:07 UTC |