You seem to confuse HTML entities with URI escaping. You should use HTML::Entities, not URI::Escape. Also, a HTML entities never looks like
�FC; It's hexadecimal, so there must be an "x" in between, or keep it decimal.
With HTML::Entities I get the expected result:
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
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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.