mirror of
https://github.com/taglib/taglib.git
synced 2026-04-12 17:09:50 -04:00
Some ID3v2.4.0 frames such as text information frames support multiple strings separated by the termination code of the character encoding. If the encoding is $01 UTF-16 with BOM, all strings shall have the same byte order. In the multi strings written by TagLib, all string elements of such a multi string have a BOM. However, I have often seen tags where a BOM exists only at the beginning, i.e. at the start of the first string. In such a case, TagLib will only return a list with the first string and a second empty string. This commit will detect such cases and parse the strings without BOM according to the BOM of the first string.