![]() |
|
Don't ask to ask, just ask | |
PerlMonks |
[SOLVED] Unicode strings internalsby vsespb (Chaplain) |
on May 10, 2013 at 13:16 UTC ( #1032959=perlquestion: print w/replies, xml ) | Need Help?? |
vsespb has asked for the wisdom of the Perl Monks concerning the following question:
I have two example files
poc1.pl:
poc2.pl:
After __END__ of each file I appended program output. Let's ignore for the moment the fact that those strings completely different and contains different characters and the fact that at some point of time one of the strings was interpreted as latin-1 etc So, in both cases strings have UTF-8 bit set. They both have non ASCII-7bit octets. Their length() and bytes::length differs. And I expect those strings should behave same way Question is why in one case string was treated as 'wide character string' and syswrite terminated the program. In other case all was working fine p.s reproduced on perl 5.10 and perl 5.14 (linux) UPD: escaped utf chars in sourcecode, as perlmonks eats it UPD: SOLVED: http://www.perlmonks.org/?node_id=1032996 http://www.perlmonks.org/?node_id=1033006
Back to
Seekers of Perl Wisdom
|
|