n10v / id3v2

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

null byte in tags #41

Closed jypelle closed 4 years ago

jypelle commented 5 years ago

When using id3v2.ParseReader(reader, id3v2.Options{Parse: true}) on (all?) mp3 downloaded from https://www.jamendo.com, extracted artist, album, title, ... contains a null byte at the end of the string.

I'm using strings.TrimRight(s,"\x00") as a workaround but I think that should be done inside id3v2.decodeText

n10v commented 4 years ago

I don't know if it's jamendo's issues or mine, but I don't think that each text in tag should be terminated with $00 (00). It's also not 100% clear from spec. But anyway I'll add trim.

n10v commented 4 years ago

Reminder for me: Add tests

n10v commented 4 years ago

Also see https://github.com/bogem/id3v2/pull/33