You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect that I'm using ID3v2.3.0, and that my default encoding is UTF-16 (with BOM). But it looks like tags.SetVersion(3) will overwrite my default choice:
I would like to advocate for replacing that choice with UTF-16 with a BOM. From the spec:
All Unicode strings use 16-bit unicode 2.0 (ISO/IEC 10646-1:1993, UCS-2). Unicode strings must begin with the Unicode BOM ($FF FE or $FE FF) to identify the byte order.
So it seems like both specs can handle that, and it can handle (almost) all characters. Using your library, my Garmin GPS displays mojibake because of this default when listening to Лигалайз or other Russian rappers.
Nitpick: UCS-2 is not UTF-16, but it should be close enough that nobody notices (maybe actually encode strings as UCS-2, or at least check that the length is exactly 2 bytes per character). Here's a really fun read on the subject: https://unascribed.com/b/2019-08-02-the-tragedy-of-ucs2.html
The text was updated successfully, but these errors were encountered:
Let's say that I do this:
I would expect that I'm using ID3v2.3.0, and that my default encoding is UTF-16 (with BOM). But it looks like
tags.SetVersion(3)
will overwrite my default choice:id3v2/v2/tag.go
Lines 305 to 315 in e76f9ab
id3v2/v2/tag.go
Lines 202 to 208 in e76f9ab
So for now I'm just changing the order around. But I have another thought:
Why is the default for version 3 ISO-8859-1? It seems to me like it should be UTF16.
I would like to advocate for replacing that choice with UTF-16 with a BOM. From the spec:
So it seems like both specs can handle that, and it can handle (almost) all characters. Using your library, my Garmin GPS displays mojibake because of this default when listening to Лигалайз or other Russian rappers.
Nitpick: UCS-2 is not UTF-16, but it should be close enough that nobody notices (maybe actually encode strings as UCS-2, or at least check that the length is exactly 2 bytes per character). Here's a really fun read on the subject: https://unascribed.com/b/2019-08-02-the-tragedy-of-ucs2.html
The text was updated successfully, but these errors were encountered: