I was having a few reading problems on a server I've recently got my hands on: the locale is set to something like French UTF8, but Putty was displaying annoying é and stuff instead of accented characters.
I was expecting the solution to be something linuxish like read boring man pages till I finally decide it's not worth the hassle and live with it, but it was so simple that I'm still amazed. Just add the following lines (in your ~/.bash_profile for instance:
-
echo -ne '\e%G\e[?47h\e%G\e[?47l'
No idea why it works, if it's for bash or any shell, but well, it just works. Cool ! (via)
Edit: As a few readers commented, there's something way easier to do in your PuTTy configuration. Read comments :)
Related posts
Shorter URL
Want to share or tweet this post? Please use this short URL: http://ozh.in/fa
Pages: [2] 1 » Show All
thought, on 30/Dec/09 at 8:05 pm # :
Thank you very much! This is simple, and it works.
Denis
said, on 10/Jun/09 at 4:23 pm # :
kick ass dood!
thanks a million!
commented, on 31/Mar/09 at 5:47 pm # :
As a point of clarification, the echo command configures the shell on the remote system (I'm not sure exactly what it does, but it is causing it to echo escape sequences through the console, which are commonly used for controlling various ways the console behaves). The PuTTY setting configures how your client handles data coming from the server. Presumably both your client and the server you are accessing would have to be configured to talk UTF-8 (or some other character set that supports wide characters, as long as they are configured to use the same one). My Debian Etch install with bash appears to handle UTF-8 by default; all I had to do was change the PuTTY configuration to deal with it properly. I would expect that older linux versions, some other distributions, or other shells might have different default configurations.