Using TagLib to write ID3v2 tags

Carsten Schmidt at
Tue Oct 17 12:30:52 CEST 2006


in a custom program I am using TagLib as a backend to tag MP3 files. The 
reason for using TagLib was the defunct unicode support of "id3lib" and 
its - IMO - better C++ interface. I am using gcc for M$ Windows and the 
OS Edition of Qt 4.

However after tagging files with my program WinAMP does not recognize 
any text frames written to the file while iTunes does. If I take a hex 
editor and take look into the file the text frames are all present. The 
problem is that I would like to use more text frames than TagLib support 
out of the box with its ID3v2::Tag class. Therefore my algorithm to tag 
a file goes like this:

1) iterate over all frames and remove them
2) set the default frames with setTitle() etc.
3) create the custom TextIdentificationFrame with 
ID3v2::FrameFactory->instance()->defaultTextEncoding() as its text encoding
4) add the custom frames with addFrame(TextIdentificationFrame)
5) save only the ID3v2 tag and strip all other tags

My guess is that somehow the text encoding does matter. A Linux 
application gtkpod does not recognize the german "umlaute" (e.g. ä 
in HTML) properly - even when the homepage does mention unicode support.

Could you please give me an advice for selecting an appropriate text 


Carsten Schmidt

More information about the taglib-devel mailing list