Thank you all again for the wealth of information. :-)
I used Data::Dumper to examine the string contents.
You can see that the string is in Perls internal UTF-8 format if the umlauts, accents etc are stored as 1-byte code points (left column in this table: https://www.utf8-chartable.de/ ) and not in the 2-byte UTF-8 format with C2/C3 as first byte.
is_utf8 seems to me just an indicator flag that Perl has either created a variable natively in UTF-8, or it has done a conversion (decode).
It does
not mean that the data is actually in Perls native format! One of the servers I use returns data which has to be decode()-d
twice to become valid UTF-8 data. So after the first decode() is_utf8 returns true, even though the data still needs another decode() run to become ungarbled. Just this to emphasize the fact that one should not blindly rely on what is_utf8 says.
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.