in reply to Using Unicode In Perl

If you got a warning like "Wide character in print...", this is a warning that happens in 5.8.x when the file handle you're printing to has not been set up to use unicode character semantics.

I don't recall off-hand why this warning matters (when I triggered the warning just now, the character still printed as intended). Look at the perlunicode and perluniintro man pages to get more info on this.

To avoid this warning, use the techniques described in the "PerlIO" man page, to open a file handle for ":utf8" i/o, or set the i/o protocol of an already-open file handle (like STDIN or STDOUT) to handle utf8 -- e.g.:

$_ = "\x{0411}\n"; # Cyrillic capital letter BE binmode( STDOUT, ":utf8" ); print; # Look, ma, no warning!

Replies are listed 'Best First'.
Re: Re: Using Unicode In Perl
by CloneArmyCommander (Friar) on Apr 13, 2004 at 17:59 UTC
    Thank you :)! With help from another monk I was able to get the characters to print, but still got the message. Thank you for telling me where I can look for answers :). I had searched the man pages before, but I didn't know what to look for. Thanks :)!