Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've had this problem for a while and I hope it's a pretty easy fix:

In various places, I'll see weird symbols appearing in the command line. Such as 'â'. It seems like it's replacing some other character..? For example, when I do

prompt -p

I'll get lots of 'â symbols. Such as:

fade theme with parameters `white grey blue':
ââââuser@hostââââ Sun Sep 05 05:57:20pm
_cwd}~/ command arg1 arg2 ... argn

user and host replaced my actual user / host, but everything else looks exactly like that.

I've also seen those symbols in g++ compiler messages, such as:

test.cpp: In function âint main()â:
test.cpp:6: warning: unused variable âxâ

What's going on and what can I do to fix it? The shell I'm using is zsh (but I also see the symbols in bash). I'm using ubuntu and putty. Thanks!

share|improve this question
add comment

2 Answers

up vote 9 down vote accepted

Your PuTTY character set and your terminal character set don't match. Use echo "$LANG" and look after the period for what it should be, and set it in PuTTY.

share|improve this answer
add comment

Your terminal is outputting characters encoded using UTF-8, but PuTTY is interpreting the bytes it is seeing in another character set (probably ISO-8859-1).

You can change PuTTY to use UTF-8 by changing the 'received data assumed to be in which character set' option under Window\Translation:

share|improve this answer
add comment

Your Answer

 
discard

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