[OS X Emacs] M-x shell and file names with umlauts

David Reitter david.reitter at gmail.com
Tue Oct 7 14:58:29 EDT 2008

On 7 Oct 2008, at 14:49, Ian Eure wrote:
>> then, suddenly, "ls" does the right thing!  I'm not sure what the  
>> correct setting for the language bit would be - en_US.UTF-8 works  
>> just as well.
> The format is:
> e.g. en_US.UTF-8 is US English encoded in UTF-8.

Well yeah, I tried de_DE first because my test file name had a German  
language umlaut, but the language doesn't matter for the coding when  
it's UTF-8.  The real question is how I would detect the right  
language from the user's settings.  You address this question:

> I don't know if Emacs even has the ability to set environment  
> variables for inferior processes. I think this is the job of your  
> shell or system init files. I'd suggest adding this to your  
> ~/.profile:
> eval `locale | sed 's/^/export /'`

Well I wouldn't ever want to alter the user's .profile from Aquamacs,  
but of course I can set an env variable from within Emacs, and  
inferior processes should inherit that.
(M-x shell does not seem to start a login shell, by the way - just a  

The other problem is that from M-x shell, this is my locale:

~$ locale

and from a login shell opened in iTerm, I get

~$ locale

Neither of them would be sufficient to display non-ASCII file names.

Isn't at least the coding part of the locale up to the terminal that  
is being used, i.e. Emacs with it's shell buffer?

> Setting the coding-system for process I/O like you did (C-x RET p)  
> is a part of setting your language environment. I'd suggest you set  
> it to UTF-8, which can be accomplished by going to Options ->  
> Language -> Set Language Environment -> UTF-8.

So, just to make it clear, you're suggesting that we set the default  
language environment that an Aquamacs user gets, to UTF-8?
Sounds to me like this has some grave implications.  Originally I was  
thinking of just modifying what M-x shell does, but of course one  
could consider this.

http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and  
support the Aquamacs Project!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2193 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20081007/db18adc8/attachment.p7s>

More information about the MacOSX-Emacs mailing list