in reply to Malformed UTF-8 character, TagLib

"Wide character in print" means you printed characters to a file handle (STDOUT) without converting them to bytes (or telling Perl how) first.

One simple way of telling Perl how to decode STDIN and encode STDOUT and STDERR is:

use open ':std', ':locale';

Replies are listed 'Best First'.
Re^2: Malformed UTF-8 character, TagLib
by Anonymous Monk on Nov 11, 2009 at 21:19 UTC

    Thanks, Tried that, Using 'locale' causes the following error.

    ascii "\x99" does not map to Unicode at /scripts/audio/audio line 254. TagLib: Could not open file /TestMusic/Blue \x99yster Cult/Don't Fear +the Reaper- The Best of Blue \x99yster Cult/06 - (Don't Fear) The Rea +per.mp3 /TestMusic/Blue \x99yster Cult/Don't Fear the Reaper- The Best of Blue + \x99yster Cult/06 - (Don't Fear) The Reaper.mp3 Can't call method "length" on an undefined value at /scripts/audio/aud +io line 227.

    Using 'utf8', Gets rid of the error, however it still does not properly display the Artists or Album names ... The $filename is still correct.

    -Enjoy
    fh : )_~

      however it still does not properly display the Artists or Album names

      We've already covered that. The library expects them to be UTF-8 encoded and they're not.

        Covered?? 1 sentence of common knowledge, 1 sentence explaining NO MORE than the error message itself, If you consider that 'covered', then I guess we have a difference of opinion of the meaning of covered!

        However, I do understand, I'll start another thread (node) and loose the 'Malformed UTF-8' part that can't seem to get looked beyond!
        It is the topic after all!

        I guess that's my fault for not separating what now appears to be TWO different issues.

        They do not all have the Malformed UTF error, however, all of the ones with high ascii characters do not display correctly!

        All the tags are written using the same application, I highly doubt that it gets it right sometimes and not others... (However, it is M$lop WMP, So it could I guess, very unlikely though!)

        On the files with Malformed UTF-8 errors, I have stripped the tags, Then added new tags with same results... I have also tried using several of the most popular taggers...
        All with exactly the same results!

        Thus, I am confident that it's not a malformed utf causing the characters to be incorrectly displayed!
        There is also the fact that every Audio player and or tagger I've tried sees/prints/displays them correctly!
        Even ones that use the same TagLib library. (Juk for example)

        -Enjoy
        fh : )_~