mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-04 17:28:39 +01:00
Addresses the Codex review on #6063. The previous version chose the encoding one character at a time, so a genuinely Windows-1252 file that happened to contain a byte pair which is also valid UTF-8 (for example '£' as C2 A3) had that pair decoded differently from the rest of the file, leaving the affected track unmatched. UTF8Reader now judges the whole BOM-less input: it keeps the bytes when they are valid UTF-8 and otherwise decodes the entire input as Windows-1252. BOM and UTF-16 handling stay as a stream and are unchanged. Signed-off-by: Steve <stevejason639@gmail.com> |
||
|---|---|---|
| .. | ||
| ioutils.go | ||
| ioutils_test.go | ||