I spent a while reading the unicode documentation with perl and it looks like you need to apply unicode attributes to the filehandle. My 5.6.1 manual only mentions it as being difficult and never actually documents how to make this work. Stepping up to 5.8.0 documentation results in the following gems: binmode DATA, ':utf8 for already opened handles, open(my $fh, '<:utf8', 'anything') for new files. open can be overridden to have unicode semantics by default by using use open ':utf8';. You can read this yourself in the perluniintro document. Perhaps someone here can fill in what the mystery 5.6.1 incantation is.
__SIG__ use B; printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B::svref_2object(sub{})->OUTSIDE;
In reply to Re: Setting UTF-8 mode on filehandle reads?
by diotalevi
in thread Setting UTF-8 mode on filehandle reads?
by jkahn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |