Emacs EMMS 和 mp3info/mplayer 的 Unicode 问题

发布于 2024-11-17 07:48:55 字数 1506 浏览 6 评论 0原文

我的 Emacs-emms 配置有问题。似乎歌曲 ID3tags 中的 Unicode 特殊字符出现时其 unicode 未呈现。例如,Trentemøller(乐队)显示为 Trentem\370ller。 它似乎来自 mp3info (当 mp3info 在 Emacs 之外使用时,这些字符也不能很好地呈现),在使用播放器 mpg321 时,emms 使用它。我该如何解决我这里的问题?其他 emms-backend-player 是否也遇到这样的问题? 您的 emms 配置是否不会出现此问题?如果是这样,您的配置是什么?

我在 MacOSX 上工作。在我的终端控制台中,Unicode 没有问题,无论是 Bash 还是安装的其他 shell 都没有问题。

编辑: emms 播放文件所使用的命令是:

mplayer -slave -quiet -really-quiet <song_file.mp3>

在控制台模式下,mplayer 也有 unicode 问题。所以我认为它要么来自 mp3info,要么来自 mplayer。

我的 emms 配置:

;; EMMS
(require 'emms-setup)
     (emms-standard)
     (emms-default-players)

(require 'emms-player-simple nil 'noerror)
     (require 'emms-source-file nil 'noerror)
     (require 'emms-source-playlist nil 'noerror)
     (setq emms-player-list '(emms-player-mpg321
                              emms-player-ogg123
                              emms-player-mplayer))

(setq emms-info-asynchronously nil)
(setq emms-source-file-default-directory "~/Music/")
(setq emms-playlist-buffer-name "*Music*")
(setq emms-player-mpg321-parameters '("-o" "alsa"))

我的 .emacs 中的 Unicode 设置

(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(set-language-environment "UTF-8")
(set-input-method nil)
(setq read-quoted-char-radix 10)

I have a problem with my Emacs-emms configuration. It seems that the Unicode special characters in the songs ID3tags appear with their unicode not rendered. For example, Trentemøller (music band) appears as Trentem\370ller. It seems it comes from mp3info (those characters are not well rendered also when mp3info is used outside Emacs), which is used by emms when using the player mpg321. How could I solve my problem here? Do you have such problems with other emms-backend-players? Do you configure your emms in such a way that you haven't this problem? If so, what is your configuration?

I'm working here on MacOSX. In my terminal console, no problem with Unicode, either with Bash than with the other shells installed.

EDIT: The command used by emms to play the file is:

mplayer -slave -quiet -really-quiet <song_file.mp3>

In console mode, mplayer also have the unicode problem. So it comes either from mp3info, either from mplayer, in my opinion.

My emms configuration:

;; EMMS
(require 'emms-setup)
     (emms-standard)
     (emms-default-players)

(require 'emms-player-simple nil 'noerror)
     (require 'emms-source-file nil 'noerror)
     (require 'emms-source-playlist nil 'noerror)
     (setq emms-player-list '(emms-player-mpg321
                              emms-player-ogg123
                              emms-player-mplayer))

(setq emms-info-asynchronously nil)
(setq emms-source-file-default-directory "~/Music/")
(setq emms-playlist-buffer-name "*Music*")
(setq emms-player-mpg321-parameters '("-o" "alsa"))

My Unicode settings in my .emacs

(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(set-language-environment "UTF-8")
(set-input-method nil)
(setq read-quoted-char-radix 10)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

任性一次 2024-11-24 07:48:55

也许您可以使用 emms-print-metadata 来设置 mp3info。

在 emms 包中包含 emms-print-metadata.c:

gcc emms-print-metadata.c -ltag -ltag_c -o emms-print-metadata

将 emms-print-metadata 移动到您的路径,并添加此行不是您的 .emacs:

(require 'emms-info-libtag)
(setq emms-info-functions '(emms-info-libtag))

享受吧。 :-)

May be you can use emms-print-metadata to instated of mp3info.

In emms package contain emms-print-metadata.c:

gcc emms-print-metadata.c -ltag -ltag_c -o emms-print-metadata

Move emms-print-metadata to your path, and add this line inot your .emacs:

(require 'emms-info-libtag)
(setq emms-info-functions '(emms-info-libtag))

Enjoy. :-)

情徒 2024-11-24 07:48:55

我认为,您还需要设置“default-process-coding-system”变量 - 它用于所有 I/O 操作......

I think, that you also need to set "default-process-coding-system" variable - it's used in all I/O operations...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文