Espera icon indicating copy to clipboard operation
Espera copied to clipboard

Wrong File Encoding with Chinese

Open liikGit opened this issue 10 years ago • 8 comments

I am not good in english,i hope anyone can understand what i say. Many Chinese words are scrambled when displayed in ArtistView. I think this may couse by Taglib. I dont know is it a bug of taglib or Espera would fixed the coding.

liikGit avatar Nov 10 '14 03:11 liikGit

中文乱码在国外的播放器上确实是很常见的。

torinkwok avatar Nov 10 '14 04:11 torinkwok

Hm, not easy for me to solve, since I have nothing in Chinese.

Could you explain the "scrambled" part a bit more? Maybe post a screenshot here?

flagbug avatar Nov 10 '14 11:11 flagbug

@flagbug He means "Garbled", like this: issue-screenshot

Maybe caused by the incompatibility between Unicode and other character set (for example, GBK).

torinkwok avatar Nov 10 '14 14:11 torinkwok

Huh, interesting, I'll see if I can fix this, thanks!

flagbug avatar Nov 10 '14 14:11 flagbug

@flagbug as TongG's post, that is what I want to say @TongG 非常感谢!

liikGit avatar Nov 10 '14 14:11 liikGit

You are welcome!

torinkwok avatar Nov 10 '14 15:11 torinkwok

@liikGit

关于中文乱码的问题我找到了一个很好的解决办法。

引起乱码的原因是因为中文歌曲的元数据一般都是使用GBK编码,而国外的音乐播放器一般不支持GBK的解码,所以会出现乱码。

解决这个问题的根本方法,要么是让播放器支持GBK编码的解析,要么就是将歌曲的元信息的编码改为UTF-8编码。我的这个方法就是从改变歌曲的UTF-8编码入手:

  • 首先需要一个MP3文件的元信息编辑器,你可以在这里下载需要用到的元信息编辑器:MP3Tag(后面的截图使用的都是它)。
  • 打开Espera,这时你可以看到,很多中文歌曲的歌曲名,专辑名等元信息都是处于乱码状态:

(这是一个陈奕迅的歌曲列表) garbled

  • 打开MP3Tag: open-mp3tag
  • 添加你想要转换元信息的歌曲所在目录:

add-directory1

add-directory2

  • 注意,此时这些MP3文件的元信息还是GBK编码,这时可以全选这些歌曲,点击工具栏中的Save按钮对所有元信息进行重新保存(不用对其元信息做任何更改),MP3Tag会自动将所有元信息就地重新以Unicode编码进行保存

resave

偶尔可能会蹦出一个警告对话框Cannot be opened for writing,不用理它,点即可 alert

  • 这时就可以回到Espera => Settings => My Music,然后点击UPDATE NOW按钮重新加载音乐库:

UPDATE-library

  • 大功告成,你可以在列表中看到,所有的元信息都已经转换为Espera可以理解的Unicode字符编码,乱码问题已经解决:

(你可以和之前乱码的截图对比一下)  everything-is-ok

另外当元信息被成功转码为Unicode编码后,不仅仅是在Windows上,再OS X和Linux上也不会再乱码了: on-mac

torinkwok avatar Nov 13 '14 05:11 torinkwok

@TongG 谢谢,这是一个方便的工具,现在Espera显示正常了! @flagbug I found taglib-sharp's function File.Create(fileAbstraction) return the wrong coding tag attributes. I am not sure it's the resaon why Espera display scrambled.

liikGit avatar Nov 13 '14 07:11 liikGit