[X] Trailing nulls in ID3v2 comments


#1

It looks like the application is incorrectly null-terminating ID3v2 comments; see https://github.com/JamesHeinrich/getID3/issues/121 for details.


#2

see the release notes for V2.81:
http://www.mp3tag.de/en/changelog.html
[2016-12-05] FIX: improved ID3v2 specification compliance by adding terminating 00 for text

               strings.

So, I would say that this is intentional.


#3

In the specification there are no nulls specified at the end of a comment text, so it is not clear why this change can be considered as an improvement.


#4

OK, let me jump in there.

In the past there were different reports from users that had issues with programs that were expecting all strings terminated with 00 (or 00 00 in case of UTF-16), which led to me changing the way Mp3tag writes strings in ID3v2.

After reading the specification again (not sure how many times I did this), it's clear to me that it makes a implicit differentiation between "text strings" and "terminated text strings". However, at one crucial point in the ID3v2.4 spec §4 it describes the structure of text strings (highlights in bold are added by me):

This can give the impression that all strings are terminated. In fact, some developers implemented in exactly this way (e.g., Apple iTunes or foobar2000), whereas others are not terminating the strings (e.g., Windows Media Player).

I'd prefer to keep this more compatible implementation. Maybe James could relax his implementation a little?

Kind regards
– Florian


#5

Thank you for the very detailed explanation, I'll inform James.