id3 tag general issues

moowei emailmoo at
Sun Jul 2 03:49:15 CEST 2006


as I was using taglib, specifically ID3v1 and ID3v2, I found the
following issues (not necessarily problems):

1. bool  TagLib::MPEG::File::strip (int tags=AllTags) doesn't strip ID3v1 tag.
but TagLib::MPEG::File::save (int tags, bool stripOthers) does when
called save(ID3v2, true);

   Frames that allow different types of text encoding contains a text
   encoding description byte. Possible encodings:
     $00   ISO-8859-1 [ISO-8859-1]. Terminated with $00.
     $01   UTF-16 [UTF-16] encoded Unicode [UNICODE] with BOM. All
           strings in the same frame SHALL have the same byteorder.
           Terminated with $00 00.
     $02   UTF-16BE [UTF-16] encoded Unicode [UNICODE] without BOM.
           Terminated with $00 00.
     $03   UTF-8 [UTF-8] encoded Unicode [UNICODE]. Terminated with $00.

I am not sure if all strings in TextIdentification frames should be
null terminated, because TagLib doesn't do so. I checked with some
other Win32 tag editing programs. They do use null terminated strings.

if we change:
      if(it != d->fieldList.begin())



in textidentificationframe.cpp line 133

maybe that do the job?

3. Since the TDRC is a string of recording time, shouldn't it be
allowed to contain more than a numerical value? some other id3 editor
may insert like 7/1/2006... and this won't work with TagLib

4. One last note: is it possible that TagLib can preserve the
original, unmodified, not converted field data especially for
TextIdentification frames and have a member function to access these
raw texts? The reason is for non-English tags, most of them are "not
correctly encoded" in Unicode, but rather in their own local charsets.
Therefore, when TagLib convert all texts into UTF16 the information
may already be distorted. This is also why Winamp allows user to
select the default non-standard charset (BMP also does this).  Well,
obviously these special tags are something not complaint with the
standard. Unfortunately they are wild spreded. It would be too much to
ask TagLib to support these, but if TagLib could simply save a raw
copy of the text when parsing, that would be wonderful.

Right now, I have a program that manually parses the tags and use
iconv library to convert them into unicode (16 or 8). Then use TagLib
to contruct the tag.



More information about the taglib-devel mailing list