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

panic: encoding: rune not supported by encoding. #88

Closed xiebruce closed 11 months ago

xiebruce commented 11 months ago

These three method not supporting rune, in other words, it only support ASCII characters

tag.SetArtist()
tag.SetTitle()
tag.SetAlbum()

I tried Chinese, Japanse, Korean, all panic: encoding: rune not supported by encoding.

tag.SetTitle("勇气")
tag.SetTitle("モトカレ")
tag.SetTitle("우유쏭")

Problem solved, just set the default encoding before setting the title, artist and album.

tag.SetDefaultEncoding(id3v2.EncodingUTF8)
tag.SetTitle("勇气")
tag.SetTitle("モトカレ")
tag.SetTitle("우유쏭")