in reply to MP3::Tag encoding problem

`perldoc diagnostics'
`perldoc splain'
$ echo Wide character in print at ./do.pl line 78. |splain Wide character in print at ./do.pl line 78. (#1) (W utf8) Perl met a wide character (>255) when it wasn't expecting one. This warning is by default on for I/O (like print). The eas +iest way to quiet this warning is simply to add the :utf8 layer to the output, e.g. binmode STDOUT, ':utf8'. Another way to turn off the warning is to add no warnings 'utf8'; but that is often closer to cheating. In general, you are supposed to explicitly mark the filehandle with an encoding, see open and perlfunc/binmode.
Also see perluniintro

Replies are listed 'Best First'.
Re^2: MP3::Tag encoding problem
by mfearby (Initiate) on Sep 21, 2008 at 09:27 UTC

    Thanks for the info. I did try "binmode STDOUT, ':utf8';" at the top of my script but it made no difference. I didn't think a simple "o" with an umlaut was unicode anyway. Isn't it a simple ASCII character? Maybe I shouldn't even be specifying utf8 the way I am?

    Anyway, I'm obviously missing something or I'm on the wrong track because with MP3::Tag, printing stuff with such characters results in black diamonds where as printing the same information, from the same MP3 file, retrieved using MP3::Info does not.

      I did try "binmode STDOUT, ':utf8';" at the top of my script but it made no difference.

      Yes it did, it got rid of Wide character in print at ./do.pl line 78.