emms-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emms-help] EMMS User Stories


From: Alex Schröder
Subject: Re: [emms-help] EMMS User Stories
Date: Thu, 17 Dec 2015 14:38:26 +0100

I have some more info about that encoding issue I was reporting.

~ $ (call-process "mp3info" nil t nil "-p" "info-artist=%a\\ninfo-title=%t\\ninfo-album=%l\\ninfo-tracknumber=%n\\ninfo-year=%y\\ninfo-genre=%g\\ninfo-note=%c\\ninfo-playing-time=%S\\n" "c:/Users/asc/Music/Arvo Paert/Adams Lament/01-06- Labbé agathon.mp3")
1
~ $ Error opening MP3: c:/Users/asc/Music/Arvo Paert/Adams Lament/01-06- Labbé agathon.mp3: No such file or directory

~ $ (call-process "mp3info" nil t nil "-p" "info-artist=%a\\ninfo-title=%t\\ninfo-album=%l\\ninfo-tracknumber=%n\\ninfo-year=%y\\ninfo-genre=%g\\ninfo-note=%c\\ninfo-playing-time=%S\\n" (encode-coding-string "c:/Users/asc/Music/Arvo Paert/Adams Lament/01-06- Labbé agathon.mp3" default-file-name-coding-system))
0
~ $ info-artist=Tui Hirv
info-title=P rt: L'abb  agathon
info-album=Arvo P rt: Adam's Lament
info-tracknumber=6
info-year=2012
info-genre=
info-note=Amazon.com Song ID: 23233660
info-playing-time=844

As you can see, when using call-process, we need to be careful about encoding arguments containing file names. These must be encoded using  default-file-name-coding-system.

Its value is cp1252 on my system (Windows). As I wrote in the very first mail, I prefer to write UTF-8 encoded files, but I'm not free to choose the encoding of my file names. This encoding is provided by the file system. The doc string of file-name-coding-system is also interesting:

file-name-coding-system is a variable defined in `C source code'.
Its value is nil

Documentation:
Coding system for encoding file names.
If it is nil, `default-file-name-coding-system' (which see) is used.

On MS-Windows, the value of this variable is largely ignored if
`w32-unicode-filenames' (which see) is non-nil.  Emacs on Windows
behaves as if file names were encoded in `utf-8'.

That's why Emacs handles those filenames just fine. It's only a problem when calling external processes such as mp3info.

Cheers
Alex

On Fri, Dec 11, 2015 at 7:24 PM, Yoni Rabkin <address@hidden> wrote:

I've just pushed out a reorganization of the Emms manual based on Alex's
suggestions. This includes streamlining the Quickstart Guide and placing
it as close to the start of the manual as possible.

--
   "Cut your own wood and it will warm you twice"

_______________________________________________
Emms-help mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/emms-help


reply via email to

[Prev in Thread] Current Thread [Next in Thread]