Greetings monks,
I was trying to apply the concepts of Packing Text in the output of a program and it's working fine to split an entire line into a nice array... until I got some unicode characters in the line.
The entire line is being from a UTF-8 file that was correctly read by using open(my $in, '<:utf8', $file), I can check by looking the debugger that the Unicode strings were correctly interpreted (like execu\x{e7}\x{e3}o) but after using the unpack function I just get garbage.
The template I'm using is A12A19A41A10A14A13A19A13A13A13A13A21A13A11A14A14 and since I have exactly 2 spaces separating the fields, the result is what I need, except for the unicode characters "corrupted".
Is there any way to apply the same concept to UTF-8 characters? I have tried using the "U" mask, but without any results.
I'm using Windows XP Service Pack 3 with Active Perl 5.8.9. And yes, I'm using chcp 65000 to get UTF-8 characters in the terminal.
Thanks to all
In reply to perlpacktut "packing text" example and Unicode by glasswalk3r
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |