clementine-player / Clementine

:tangerine: Clementine Music Player
https://www.clementine-player.org/
GNU General Public License v3.0
3.68k stars 670 forks source link

Clementine 1.3.1/1.4.0rc1-596-g590bcf1c7 Windows 10 playlist font #7012

Open krassivb opened 3 years ago

krassivb commented 3 years ago

Clementine shows garbage characters when playlist filenames contain Cyrillic or other non standard characters (French, Asian, etc.) And the playlist can't be played. If the same files are dropped into the main window they are playable. clementine_playlist1 clementine_playlist2

jbroadus commented 3 years ago

What format playlist? Was it created by Clementine?

If I save a pls from Clementine, the names in the resulting filenames are malformed. xspf is fine. If I edit the playlist to correct the filenames, then Clementine can load it.

krassivb commented 3 years ago

Playlists (m3u, cue) was created by other software. If it's created by Clementine (m3u) is playable.

jbroadus commented 3 years ago

The m3u parser is making assuming about utf-8, so that would cause problems if the file is utf-16. But it doesn't look like the cue parser has that problem. Do you have any sample playlists, or snippets of playlists, that you can share?

jbroadus commented 3 years ago

But if this was a utf-8 vs utf-16 issue, then all of the text should be unreadable.

krassivb commented 3 years ago

I have edited, created new m3u and delete most of the files, but here is m3u's and cue one. Pure - Lara Fabian.zip 2015 - Essential.zip From the "essentials" the 10th track is not playable, from "pure" - the 8th track.

jbroadus commented 3 years ago

Okay, this is ISO-8859, but Qt thinks it's UTF-8. The file utility detects these correctly, so it might be possible to do something similar, but it's kinda messy: https://github.com/file/file/blob/master/src/encoding.c#L236 It might also be possible to search for the QChar::ReplacementCharacter in the individual decoded lines.

The xml formats shouldn't have this problem since they specify encoding.