On Tue, 2006-18-04 at 19:34 -0400, Chas Owens wrote: > On 4/18/06, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: > snip > > Yes but in UTF-8, '0' is "\x{30}" or "\x{0030}". (The newer versions of > > Perl being 5.8+) > snip > > That was my point. That assuming \x30 is the character '0' is now > safe since all source code is interpreted as UTF-8. Is input from > files UTF-8 by default or do you have to do the "<:encoding(UTF8)" > thing? >
Sadly, not all is Unicode. If you try: print "\x{20a4}\n"; You might get the British pound sign, but you will get the warning: wide character in print at ... To fix this: binmode STDOUT, ':utf8'; See: perldoc -f binmode perldoc -f open perldoc perluniintro perldoc perlunicode -- __END__ Just my 0.00000002 million dollars worth, --- Shawn "For the things we have to learn before we can do them, we learn by doing them." Aristotle * Perl tutorials at http://perlmonks.org/?node=Tutorials * A searchable perldoc is at http://perldoc.perl.org/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>