clementine-player / Clementine

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

CP1251 and other CP encodings support in media tags #4788

Open Yanpas opened 9 years ago

Yanpas commented 9 years ago

A lot of music with cyrillic tags ancoded in CP1251. And I don't know any player in Linux that supports it. Moreover there is no support of cp1251 in windows, where it is default encoding. Is it clementine's guilt or libtag1-vanilla's?

user-42 commented 9 years ago

Use the Unicode, Luke. Convert your tag encoding.

Yanpas commented 9 years ago

iTunes supports both encodings. Maybe do not listen non-latin music?:D

Tatsh commented 9 years ago

That is not true @Yanpas. I have extreme doubts that iTunes supports both encodings, as they program that in Objective-C (yes even on Windows), where the encoding of strings is always Unicode.

If you are on Windows, It is likely your system locale is set to a Cyrillic-writing language (like Russian) which means any non-Unicode text will be auto-converted from the most common text codec (CP1251) to Unicode (specifically, UTF-32) and you will not see it. iTunes does not see it either as the conversion is transparent to all software. You should try setting your Windows machine locale to English, rebooting, and watch how iTunes screws up badly at showing your tags (along with anything else that assumes they are just regular Unicode or ASCII).

I agree with @user-42. Convert your tags to Unicode. There is nothing in CP1251 that cannot be represented in Unicode fully. There are tools to do this. Even on Linux you could combine iconv with id3ted on the command line. This shows going from UTF-8 to CP1251 and back to UTF-8:

# Пётр Ильич Чайкoвский -> Piotr Il'ich Chaikovskii (via unidecode)
$ id3ted -l some.mp3 | fgrep TPE1
TPE1: Пётр Ильич Чайкoвский
$ id3ted -l some.mp3 | fgrep TPE1 | iconv --from-code=UTF-8 --to-code=CP1251
TPE1: <garbage>
$ id3ted -l some.mp3 | fgrep TPE1 | iconv --from-code=UTF-8 --to-code=CP1251 | iconv --from-code=CP1251 --to-code=UTF-8
TPE1: Пётр Ильич Чайкoвский

So if id3ted gives you garbage for TPE1, TIT2, etc, then you can convert with iconv. You can even set the tag on the fly. This shows setting the artist:

id3ted -a "$(id3ted -l some.mp3 | fgrep TPE1 | sed -e 's/^TPE1: //' | iconv --from-code=CP1251 --to-code=UTF-8)" some.mp3
Yanpas commented 9 years ago

hm, so why windows version of Clementine doesn't behave like iTunes (doesn't automatically convert cp1251 to utf8 in background) ? There is also DeadBeef player which automatically recognizes cp1251 on Linux (i haven't found anywhere in settings mention of cp1251).

Anyway mid3iconv -eCP1251 *mp3 helps me (to install it - install python-mutagen)

nikolayo commented 9 years ago

My bit to this : I use the Linux version of Clementine 1.2 on Ubuntu 14.04. My locale is en_US.UTF-8. Clementine plays fine tracks with titles in Cyrillic. Titles are displayed correctly in the file browser but come up garbled in the library browser and in the playlist tabs.

TheBestDenis commented 3 years ago

For the information of dear audiophiles and IT specialists. The CP1251 encoding has been used for more than a dozen years. If you respect yourself, then respect others as well. Support for this encoding is necessary. Are you programmers? Or maybe losers? It is incorrect to limit yourself to one encoding. The application has a multinational and multilingual target audience. Screenshot_20210925_230657 A properly working application must correctly display not only the list of files, but also the window title and the description of the file contents (mp3-tags, etc.). It must! If you show it, show it correctly.

fitojb commented 3 years ago

@TheBestDenis LMAO.

0x131315 commented 1 year ago

Lol, still it is not fixed? omg

alien190 commented 1 year ago

Oh, I have the same trouble.