Character encoding issues when viewing ID3 tags
eyeD3 seems to have some issues with correctly displaying ID3 tags coded in a certain way on the command line. Basically, some strings come out double-encoded, so that a ‘å’ looks like ‘Ã¥’ (which is UTF-8 for ‘å’ when interpreted as latin1).
I’ll attach two MP3 files (I just ran ‘head -50’ on a few longer files with and without this problem, to reduce the file sizes, so the complete files may not 100% valid MP3 files, but they’re playable, and the ID3 info is intact). The file ‘ok-small.mp3’ works fine:
$ eyeD3 ok-small.mp3 title: Damen i tåken – del 4 av 8 […] Kriminalserie i åtte episoder
But the file ‘not-ok-small.mp3’ shows wrongly encoded characters:
$ eyeD3 ok-small.mp3 title: Fatuhiva – tilbake til naturen – del 7 av 10 album: Verdt Ã¥ lese […] Blir ogsÃ¥ sendt senere i kveld kl. 19.00.
Note that in both cases the title (encoded in UTF-8, since it contains an en-dash (–) not available in latin1) are correctly displayed. But for the first file the ‘å’ (in ‘åtte’ in the description tag) is correctly displayed, while for the second file it is incorrectly displayed as ‘Ã¥’ (for the album and description tag, ‘Verdt å lese’ and ’Blir også’).
The tags are correctly displayed if I open the files in either Amarok or VLC.
(For the first file, I added the tags using an old version of Amarok, which I believe stores everything as UTF-16. For the second file I used a more recent version of Amarok, which is I believe smarter when encoding the tags, and only using a character encoding if it is needed (i.e., it uses latin1 if all characters are available in latin1, and UTF-8 if not).