Post Reply 
Track and album names displayed with replacement character. How to resolve?
25-01-2024, 14:22 (This post was last modified: 25-01-2024 14:28 by paultaylor.)
Post: #17
RE: Track and album names displayed with replacement character. How to resolve?
(25-01-2024 12:45)simoncn Wrote:  Text fields are NUL-terminated in ID3v2.4. Here is the relevant section:

If that were true according to the spec a custom frame (TXXX) body using ISO-8859 with description CUSTOM and value Fred would be encoded as:
Code:
\0CUSTOM\0\0Fred\0

but it is not most do this

Code:
\0CUSTOM\0Fred

some incorrectly do this

Code:
\0CUSTOM\0Fred\0

but that makes no sense because both Description and Value are defined as being text string according to encoding and additionally there is null terminator (based on encoding) defined between the two.

The spec is confusing but Im sure it is just saying that for a particular encoding this is the null termination to use when you need a null terminator

so if you were using UTF8 in the above example you should have

Code:
\3CUSTOM\0Fred

but if using UTF16BE would be (not showing multi bytes of CUSTOM or Fred here)

Code:
\2CUSTOM\0\0Fred

If CUSTOM contained two values Fred and Jim then you would have

Code:
\3CUSTOM\0Fred\0Jim

or

Code:
\2CUSTOM\0\0Fred\0\0Jim
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Track and album names displayed with replacement character. How to resolve? - paultaylor - 25-01-2024 14:22

Forum Jump:


User(s) browsing this thread: 1 Guest(s)