Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: id3v2.x (Read 3781 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

id3v2.x

Two short questions about the id3 tags.

I have implemented an id3v2.3-4 reader. This works fine on 2.3 and 2.4 tags, but is it capable of reading version 2.1 and 2.2? I do not have any mp3 files with a tag with these versions.

How do i see if a tag is encoding with UTF-8?

id3v2.x

Reply #1
Quote
Two short questions about the id3 tags.

I have implemented an id3v2.3-4 reader. This works fine on 2.3 and 2.4 tags, but is it capable of reading version 2.1 and 2.2? I do not have any mp3 files with a tag with these versions.

How do i see if a tag is encoding with UTF-8?
[{POST_SNAPBACK}][/a]

Hi stigc,

UTF-8 is only supported in ID3v2.4 (UCS-2 is used in 2.2 and 2.3, but they differ, 2.3 requires a byte order marker and 2.2 assumes big endian).  Most text frames have an additional byte after the header which specifies the encoding:
0x00 is ISO-8859-1 (in other words ASCII, to be simplistic)
0x01 is UCS-2 in 2.2 an 2.3 (note differences), UTF-16 with BOM in 2.4
0x02 is UTF-16BE in 2.4 only
0x03 is UTF-8 in 2.4 only

Edit:  ID3v2.2 was originally called ID3v2 or ID3v2.0, there's no ID3v2.1.

Hope this helps.  Also, check their [a href="http://id3.org]website[/url].

id3v2.x

Reply #2
Rolling your own ID3 functionality, in general, is a bad idea. There's too much inconsistency and incompatibility for you to cover all the bases. The best approach is to use an existing library, like id3lib. Much simpler and better in the long run.

id3v2.x

Reply #3
libid3tag is even simpler, but covered by a stricter license. It also automatically upgrades all tags to v2.4, and in the process, upgrades deprecated frame types to newer replacements. Hence, it is incapable of writing v2.3 or older tags. Hmm, and it also uses UCS-4 internally for all strings, although it does provide conversion functions.

id3v2.x

Reply #4
I avoid libid3tag specifically because it upgrades your tags to 2.4. 2.4 isn't compatible with a lot of software out there.

 

id3v2.x

Reply #5
I don't suppose that matters if you're only reading tags, now does it? It makes a nice, compact, modular solution if that's all you need.