ID3v1 tags being returned nul character padded

Dave Blake daveblake at kodi.tv
Fri May 6 05:44:18 UTC 2016


Noticed a change in Taglib 1.10 from 1.9 in the way ID3v1 tags are returned
and wondering if this is deliberate or a side-effect, and either way is it
desireable? I have not been able to test 1.11 yet to see what happens there.

In 1.9 accessing ID3v1 tags using to8Bit returned a standard nul terminated
string the size of the actual text as happens for ID3v2 tags, but in 1.10
this string is always padded with nul characters to a fixed size. This
means that using size() or empty() on the returned string is meaningless.
Generally the trailing nul padding is not too much an issue, but it makes
it harder to detect an empty tag. The wiki says that this should return
nul, but for ID3v1 it is returning a string of nul characters instead.

If 1.10 behaviour is to be kept, then it would be good to highlight this
change in the release notes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20160506/9adb3f88/attachment.html>


More information about the taglib-devel mailing list