navidrome/utils/ioutils
Steve da0899de2b fix(ioutils): recover Latin-1/Windows-1252 text in playlists and lyrics - #6037
UTF8Reader decoded non-BOM input strictly as UTF-8, so a byte that was not
valid UTF-8 became the replacement character U+FFFD. Playlists and lyrics
saved by Windows editors are commonly Windows-1252/Latin-1, where accented
characters are single high bytes (for example é as 0xE9). Those bytes were
mangled into U+FFFD, so an M3U entry like 'PokéMon' no longer matched the
scanned library path and the track was silently skipped, while pure-ASCII
entries in the same playlist imported fine.

UTF8Reader now keeps valid UTF-8 untouched and decodes any invalid byte as
Windows-1252 (a superset of Latin-1), recovering the accented characters
instead of losing them. BOM handling and UTF-16 transcoding are unchanged.

Closes #6037

Signed-off-by: Steve <stevejason639@gmail.com>
2026-09-01 12:48:56 +05:30
..
ioutils.go fix(ioutils): recover Latin-1/Windows-1252 text in playlists and lyrics - #6037 2026-09-01 12:48:56 +05:30
ioutils_test.go fix(ioutils): recover Latin-1/Windows-1252 text in playlists and lyrics - #6037 2026-09-01 12:48:56 +05:30