On Jun 15, 2005, at 2:48 PM, Robin wrote:
I thought I'd understood how to use unicode support in perl, but
evidently not. In the script below, I'm stumped as to:
1) why the regex won't match '月'.
2) why the substitution is carried out, but the result isn't in
UTF8, nor is it UTF8 re-encoded in UTF8 (uncomment #require
Encode; ........... #Encode::decode_utf8($_); to test this )
The binmode() calls you've included tell Perl that the data coming
from and going to those file handles is UTF8 encoded.
But, you have UTF8-encoded text in your code, too. To tell Perl about
that, you need to use the "use utf8;" pragma.
sherm--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org