2

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)

2 Answers2

1

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. :-)

0

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

Alex Ott
  • 80,552
  • 8
  • 87
  • 132
  • Thanks for your help Alex. I have tried to define this variable in my .emacs but I don't find the value that I should set: Indeed, when I eval my buffer, emacs answers me that the value 'utf-8 is not OK. I also looked up in the [Emacs Lisp manual](http://www.gnu.org/software/emacs/elisp/html_node/Default-Coding-Systems.html), which hasn't helped me a lot. Finally, I've looked up in your own .emacs files on [github](https://github.com/alexott/), where I was already following your work for a while, but you seem to have defined your encoding environment differently :-/. –  Jun 27 '11 at 09:59
  • this variable is cons pair, so you need to set it using something like : '(setq-default default-process-coding-system '(utf-8 . utf-8))'. See http://www.gnu.org/software/emacs/elisp/html_node/Default-Coding-Systems.html for more details... – Alex Ott Jun 27 '11 at 10:45
  • Another hint - instead of setting all variables explicitly, it's better to customize variable 'current-language-environment' - it should setup all other entries accordingly (as I remember) – Alex Ott Jun 27 '11 at 10:47
  • OK, the _default-process-coding-system_ and _current-language-environment_ variables are correctly set to utf-8 :-). Thanks a lot. Unfortunately, it doesn't solve my emms problem :-(. I think it comes from mplayer or mp3info, because in the emms buffer, the first song is shown with its IDtags and is mispelled while the paths to the next songs are correctly spelled (with the ø). –  Jun 27 '11 at 11:32