Hi again Harald
> A decent print unpack 'H*',$data does the same with less fuss.
Actually, why should I bother to spot the non-ASCII between all the hex-codes? °
DB<50> $data = 'Künzler'
DB<51> print unpack 'H*',$data
4b816e7a6c6572 # ORLY?
DB<52> use Data::Dump qw/pp dd/
DB<53> dd $data
"K\x81nzler" # <---
DB<54> use Devel::Peek
DB<55> Dump $data
SV = PVNV(0xd9adb8) at 0x351ac30
REFCNT = 1
FLAGS = (POK,IsCOW,pIOK,pNOK,pPOK)
IV = 0
NV = 0
PV = 0x355bcd8 "K\201nzler"\0 # <---
CUR = 7
LEN = 10
COW_REFCNT = 2
Hint: this time not UTF8, did you notice easily?
Devel::Peek is core and shows multiple relevant infos in one command.
It has some minor disadvantages, but if the OP had shown us the output we'd knew immediately that his code is correct, except the debugger settings.
Telling people explicitly not to use it is pretty surprising ...
°) yes I know that ASCII is below 0x80 and how to spot utf8 multi-bytes. But do others?
And normally I use a water heater when I need tea and don't start to collect decent wood in the forest. ;-)
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||