strawberrymusicplayer / strawberry

:strawberry: Strawberry Music Player
https://www.strawberrymusicplayer.org/
GNU General Public License v3.0
2.67k stars 183 forks source link

Strawberry cannot correctly display russian names from flac after drag'n'dropping .cue file to queue #1429

Closed soredake closed 4 months ago

soredake commented 5 months ago

Describe the bug Strawberry cannot correctly display russian names from flac after drag'n'dropping .cue file to queue

To Reproduce Drag'n'drop .cue with russian names to strawberry.

Expected behavior This: image

Screenshots: image

System Information:

Additional context Add any other context about the problem here.

jonaski commented 5 months ago

What encoding is the cue file in? I suspect it only supports UTF-8.

soredake commented 5 months ago

Visual Studio Code displayed this encoding: image

jonaski commented 5 months ago

Can you paste the .cue file here and I will check if we can implement handling of more encodings, or at least show an error if it's not UTF-8.

soredake commented 5 months ago

М.КРУГ - ЖИГАН - ЛИМОН.zip

jonaski commented 4 months ago

Qt only detects UTF encodings, so we need to write our own code, or use a another library (ICU or libmagic?) for that. QTextStream::setCodec is gone in Qt 6, we need to use QTextStream::setEncoding, but it doesn't have support for all the encodings (https://bugreports.qt.io/browse/QTBUG-109254), looks like there is some work done for that here: https://codereview.qt-project.org/c/qt/qtbase/+/429820

jonaski commented 4 months ago

And I wonder how KDE does this? kate detects the encoding.