MusicPlayerDaemon / MPD

Music Player Daemon
https://www.musicpd.org/
GNU General Public License v2.0
2.19k stars 350 forks source link

Chinese characters in artist names #504

Closed ghost closed 5 years ago

ghost commented 5 years ago

I'm randomly getting random chinese characters on artist names. Some with special characters (like í) and others not. 2019-03-08_20-31

owl770 commented 5 years ago

I have this same problem with some of my tracks. I realise that it is not an MPD issue as it is just displaying the characters as received. I think my problem started when I edited ID3 tags using ncmpcpp. I assume it is an encoding problem but I don't know how to fix it. Any tips/suggestions/ideas would be greatly appreciated. Thanks.

ghost commented 5 years ago

@owl770 I have checked with gnome-music, rhythmbox and even Retro Music (in Android) the tags, and they don't have chinese characters. What application are you using to check it?

owl770 commented 5 years ago

@makmm I can see the Chinese characters in MPDroid, mpc, o!mpd

Screen Shot 2019-03-11 at 8 58 36 am

owl770 commented 5 years ago

And this is what "File Info" in O!MPD displays for one of the tracks... Screen Shot 2019-03-12 at 10 39 04 pm

MaxKellermann commented 5 years ago

What makes you believe that this is a MPD bug and not a bug in the client you're using?

owl770 commented 5 years ago

As I mentioned in my original post, I don't believe it to be an mpd bug but based on the OP comment, I just wanted some guidance on how to fix it (if anyone had come across it before)...

MaxKellermann commented 5 years ago

The question was meant for the submitter. He didn't provide any useful information, not even his MPD version number.

MaxKellermann commented 5 years ago

Will reopen when the required information is posted.

ghost commented 5 years ago

@MaxKellermann Ah sorry, I hate GitHub so I almost never log in into it. I tried with ncmpcpp and mpc and both failed, so I just assumed it was MPD's fault. any other client I can try with?

MaxKellermann commented 5 years ago

What did they fail? You still did not post your version number. Why do you believe that your file is correct? Upload an example file demonstrating the problem. You said this occurs randomly. So sometimes one file gets chinese characters, and sometimes that very same file does not get chinese characters? This doesn't make sense. Be more specific and exact in your problem description. I can't help unless you help me understand your problem.

ghost commented 5 years ago
~ % mpc list title
GDFR (feat. Sage The Gemini & Lookas) (K Theory Remix)
~ % mpc list artist
Flo Rida
䰀漀漀欀愀猀
匀愀最攀 吀栀攀 䜀攀洀椀渀椀
~ % mpd --version
Music Player Daemon 0.21.6 (0.21.6)

Screenshot_20190401_184720 https://www77.zippyshare.com/v/vcoN7Z8O/file.html

The same file always gets chinese characters, it just doesn't seem to have a pattern between files.

is that enough?

MaxKellermann commented 5 years ago

Your file has three "Artist" tag values: "Flo Rida", "Sage The Gemini" and "Lookas". The three are part of one ID3v2 string list; at the beginning of the string list, there is a UTF-16 byte order mark. The first tag value "Flo Rida" is decoded properly by libid3tag; however libid3tag then forgets about the byte order mark, and parses the next two values of the string list without that knowledge, leading to garbage (which just happens to be Chinese characters).

This is a libid3tag bug, and MPD can do nothing to fix this, sorry. This must be fixed in libid3tag.

From the ID3v2 standard: http://id3.org/id3v2.4.0-structure

UTF-16 [UTF-16] encoded Unicode [UNICODE] with BOM. All strings in the same frame SHALL have the same byteorder.

ghost commented 5 years ago

@MaxKellermann Well if I'm being honest I didn't understand nothing of that, could you please report this issue yourself? thanks.