I'm trying to write a tool that requires to read mp3 tags. Currently, I use id3lib, but I have problems interpreting the text strings if they contains non-ASCII characters. I found out that even the commandline tools id3info that comes with libid3 has Problems with the tag. For my sample song (Artist: Die Ärzte; Title: Dinge von denen; Album: Geräusch), I get the following results when id3info, mp3info and exiftool.
mischa@mischa-t420:~/workspace/mivabeing/miv/tests/data/mp3$ id3info song.mp3
*** Tag information for song.mp3
=== TALB (Album/Movie/Show title): Gerdusch
=== TPE1 (Lead performer(s)/Soloist(s)): Die Drzte
=== TIT2 (Title/songname/content description): Dinge Von Denen
=== TRCK (Track number/Position in set): 5
*** mp3 info
MPEG1/layer III
Bitrate: 192KBps
Frequency: 44KHz
mischa@mischa-t420:~/workspace/mivabeing/miv/tests/data/mp3$ mp3info song.mp3
File: song.mp3
Title: Dinge Von Denen Track: 5
Artist: Die �rzte
Album: Ger�usch Year:
Comment: Genre: [255]
mischa@mischa-t420:~/workspace/mivabeing/miv/tests/data/mp3$ exiftool -json song.mp3
[{
"Album": "Geräusch",
"Artist": "Die Ärzte",
"Title": "Dinge Von Denen",
.....
}]
id3info interprets "Ä" as "D" and "ä" as "d". mp3info interprets "Ä" and "ä" by "�". exiftool interprets "Ä" and "ä" correctly.
Am I using id3info incorrectly? Do you thing it is a bug in ID3lib? Do you known an alternative C / C++ library for mp3 tag retrieval?
Best regards Michael