Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I cannot for the life of me get utf-8 characters to appear correctly in emacs term mode on osx. They either appear as empty spaces or "<00e3><0081><00af>". I can view them in text buffers fine. I have the following 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)

I've also tried switching fonts, but to no avail. Does any one have any suggestions? I don't have any problems with the identical setup in Ubuntu. Does this have anything to do with the fact that I'm using zsh?

share|improve this question
    
Can you show the value of variable (describe-variable 'default-terminal-coding-system)? –  artscan Jan 25 '13 at 9:12
    
The valuable of the variable (describe-variable 'default-terminal-coding-system) is "utf-8" –  jshou Jan 25 '13 at 19:20
    
In *terminal* buffer I have the value of command echo $TERM - eterm-color. And I have directory ~/.terminfo/e/ and the files eterm-color* are there. What about your config? –  artscan Jan 26 '13 at 4:56
    
My term was xterm-256color, but I switched to eterm-color just to see what would happen, but nothing has changed. It seems that I can actually type utf-8 characters and have them show up in term, but there are some utf-8 characters in the zsh prompt string that will not show up. Is that a different issue? –  jshou Jan 28 '13 at 16:40

2 Answers 2

Try setting these values in your .zshenv

export LANG='en_US.UTF-8'
export LC_ALL="en_US.UTF-8"

It can be a source of errors since in Linux distributions the correct values use lowercase utf (e.g. en_US.utf-8)

To view all available locales use locale -a

share|improve this answer
up vote 0 down vote accepted

Using this port of emacs for mac instead seemed to fix things: https://github.com/railwaycat/emacs-mac-port

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.