Null characters are included in WavTag.toString

Issue #181 resolved
Dan Gravell created an issue

Something that tripped me up when debugging...

WavTag.toString outputs the tag content into a String. Unfortunately the INFO tag contains null terminators, and these are included in the output. Given that a null character in a String tends to mean it is terminated, this confuses other applications. For example, if you try to copy/paste the output of toString it will only copy up to the end of the first field in the INFO tag.

I'm not really sure what is proper practice here! Given toString is only used for human readable representations of the WavTag it might be better to strip the null characters to make the resulting strings more interoperable.

Comments (2)

  1. IJabz repo owner

    Actually the biggest culprit is the ID3 tag, for Wav id3 fields have to be null terminated to display correctly in Windows Explorer, fixed for both.

  2. Log in to comment