in reply to Re: perlpacktut "packing text" example and Unicode
in thread perlpacktut "packing text" example and Unicode

Thank you for the explanation. But assuming I'm already have the data "classified" as UTF-8, is it possible to use "A" patterns with unpack? Since the data has a fixed size, unpack looked like the most obvious choice do to that.

Should I stop reading the file as UTF-8 and using unpack with the "raw" data? Which pattern I should use with unpack in this cause and how to put the data back as UTF-8 correctly?

I checked the documentation of Perl 5.10 and higher and there is a W pattern that should be used for Unicode. But that didn't helped me either

Alceu Rodrigues de Freitas Junior
---------------------------------
"You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill