dweymouth / supersonic

A lightweight and full-featured cross-platform desktop client for self-hosted music servers
GNU General Public License v3.0
946 stars 46 forks source link

Chracter-set issues #500

Open UltraBlackLinux opened 3 weeks ago

UltraBlackLinux commented 3 weeks ago

Hey there, A few of the artists and music in my library contain japanese characters, but they don't properly show within supersonic desktop: image Here are the titles and some more examples:

'ネザーnether - SLUSHWAVE 2024.mp3'
'憂鬱 - End.mp3'
'猫 シ Corp. - FORUM 消費者[kuluttaja].mp3'
'猫 シ Corp. & t e l e p a t h テレパシー能力者 - Blue  Dream.mp3'
'秋 - Live @ Slushwave 2024.mp3'
'秋 - 私はまだあなたが必要です + 屋久島 + 大山隠岐国 + 夜間 (extended version).mp3'

I'm on SSD v0.13.1. Any chance that you could fix this? Thanks!

dweymouth commented 2 weeks ago

Supersonic loads fonts from the OS as needed to display characters not in the base font, but this does look like a character encoding issue, like your files are not tagged with UTF-8 metadata. Do you know the character set encoding of your media file tags? It seems it's currently assuming everything is UTF-8 (which is the default in the Go programming language and on most modern systems). I also have not run into a non-UTF-8 tagged media file myself. I may need you to attach a media file here or email me one to test with before I can look into this issue. I guess Supersonic will need to use some character encoding library to detect encodings of all the file tags and convert them to UTF-8 on the fly if needed?

UltraBlackLinux commented 2 weeks ago

I have honestly no idea how to check that. They display fine in my terminal and that is using UTF-8:

LANG=en_GB.UTF-8
LC_CTYPE=en_GB.UTF-8
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=

Here's some files that you could grab with yt-dl - that's how I got them: https://www.youtube.com/watch?v=_45xy5o4uj8&list=PLSBYfyLFV5VHV8Tj4BKlNYHqcUQcE0E0f

UltraBlackLinux commented 2 weeks ago

Hm I just noticed that if you show the track info for a track with these characters it shows the correct filename, but it doesn't in the "Artists" section. Maybe something went wrong during file tagging...

I used id3v2 for that, and it shows all characters correctly.

I did however also just notice that supersonic crashed when I pressed the "copy" button next to the track name, maybe something on supersonic's side after all

thecivilizedgamer commented 3 hours ago

I just installed Supersonic, it looks and works great so far, nice work! The experience is very polished.

However, I'm seeing something similar on Xubuntu 24.04. I haven't dug into any details yet, but Japanese characters are showing fine in Nextcloud Music and not in Supersonic. I'll attach screenshots, let me know what info I can provide. Screenshot_2024-11-25_23-35-52 Screenshot_2024-11-25_23-34-38