n10v / id3v2

🎵 ID3 decoding and encoding library for Go
https://pkg.go.dev/github.com/bogem/id3v2/v2
MIT License
338 stars 52 forks source link

ID3v2.4: Nullbyte-separated multivalue fields #91

Open karlpip opened 1 month ago

karlpip commented 1 month ago

According to the 2.4 spec there can be text frames with multiple values. These values are separated with nullbytes. The current implementation of these frames just omits these nullbytes right here https://github.com/n10v/id3v2/blob/main/encoding.go#L121. So one has no chance to handle these kind of values correctly.

PS: Picard music tagger can be used to add multi value TXXX fields to an ID3 tag if you need test cases. According to the spec TXXX frames can't hold multiple values, but picard does it anyway, i would really like to have an option to handle this scenario with the library as well.