Summary: | taglib destroys id3v2.4.0 Tags, by forgetting the null-bytes in Textstrings | ||
---|---|---|---|
Product: | [Frameworks and Libraries] taglib | Reporter: | Mark <c2wrvxqgsz71nm9> |
Component: | general | Assignee: | Scott Wheeler <wheeler> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Mark
2007-09-02 09:42:22 UTC
I'm afraid you misunderstood the standard. Null is used as a field separator in a list with multiple values in ID3v2.4, not as a terminator. Null is also the terminator! From the id3v2.4.0-structure document: >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. As can be seen, all strings (which allow an encoding) have to be terminated by a Null-byte. This applies to all Text-frames "T...". Besides all of these text-frames can contain multiple values. If there is only one value (=a list with only one element), this doesn't change the fact, that this single element also has to be terminated! I'm sorry, you're simply wrong on this. This has been discussed multiple times on the ID3v2 mailing list. A null terminated string in ID3v2.4 is technically incorrect (though many implementations do so) as it represents a list of ("value", ""). This is a change from the ID3v2.3 semantics where the terminator was explicitly optional. The text which you quoted explains what the termination character is when strings are terminated (since it's encoding dependent), but if you read through the rest of the spec you'll notice that all places where terminators are needed they are explicitly listed in the byte listings. |