Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong File Encoding with Chinese #137

Open
liikGit opened this issue Nov 10, 2014 · 8 comments
Open

Wrong File Encoding with Chinese #137

liikGit opened this issue Nov 10, 2014 · 8 comments
Labels

Comments

@liikGit
Copy link

liikGit commented Nov 10, 2014

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.

@torinkwok
Copy link

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

@flagbug
Copy link
Owner

flagbug commented Nov 10, 2014

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?

@torinkwok
Copy link

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

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

@flagbug flagbug added the bug label Nov 10, 2014
@flagbug
Copy link
Owner

flagbug commented Nov 10, 2014

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

@liikGit
Copy link
Author

liikGit commented Nov 10, 2014

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

@torinkwok
Copy link

You are welcome!

@torinkwok
Copy link

@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

@liikGit
Copy link
Author

liikGit commented Nov 13, 2014

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants