basically, if your data was encoded on a per byte basis, then it doesn't make much sense treating it as unicode before it was decoded.
You should transform it back per byte and then treat it as unicode (if necessary)
And posting your data into HTML doesn't really help!
try something like
DB<200> $str=join "","äöüÄÖÜß"
DB<201> printf '\\x%X,',$_ for unpack 'C*',$str
=> ""
\xC3,\xA4,\xC3,\xB6,\xC3,\xBC,\xC3,\x84,\xC3,\x96,\xC3,\x9C,\xC3,\x9F,
or even
DB<202> unpack 'H*',$str
=> "c3a4c3b6c3bcc384c396c39cc39f"
this should already be a strong hint on how to solve your problem ...
Thank you!
Cheers Rolf
( addicted to the Perl Programming Language)
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.