Multi-value TXXX frames encoded as UTF-16 not read properly

Issue #250 new
IJabz repo owner created an issue

If multiple null terminated values are stored in a TXXX frame and it has to be encoded as UTF-16 because using ID3v23 and there are characters that cannot be encoded as ISO-8859-1 and if the UTF-16 was written with BOM then we have a problem on read.

TextEncodedStringSizeTerminated gets the correct decoder but treats this muti string as a single string so only the the first BOM get stripped out. Then there is code added to strip out the remainder bu by this time the decoder has converted FFFE or FEFF to FFFD (unparsable character) so that code fails.

Comments (3)

  1. IJabz reporter

    Note we are not the only ones many ID3 parsers expect there to just be a single BOM at the the start of the description field but the ID3 spec clearly says Information <text string(s) according to encoding> so noting the plural if encoding requires BOM there should be one for each value. Of course if using ID3v24 and UTF8 then the problem is avoided

  2. IJabz reporter

    Maybe the problem was that the original file was slightly corrupt (was missing null terminator value) because struggling to get it to fail consisistently

  3. Log in to comment