In: , , , ,
On: 2007 / 08 / 03 Viewed: 51326 times

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:

CODE:
  1. 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

Metastuff

This entry "How To Display UTF8 in your Putty Bash Shell" was posted on 03/08/2007 at 10:05 pm and is tagged with , , , ,
Watch this discussion : Comments RSS 2.0. You can trackback this post from your own site

8 Blablas

  1. 1
    Daniel Fort Ukraine »
    thought, on 22/Sep/07 at 9:48 am # :

    Thnx man, that really hepled.

  2. 2
    Renny Russia »
    replied, on 16/Dec/07 at 10:24 pm # :

    Thanks again! Your post did save me so much time!!!

  3. 3
    Santiajo Spain »
    wrote, on 26/Feb/08 at 2:15 pm # :

    Did you set in putty UTF-8 char set?

    Configuration -> Window -> Translation -> UTF-8

  4. 4
    Ozh France »
    wrote, on 26/Feb/08 at 9:49 pm # :

    Santiajo » Oh... My... God. Never saw this setting before... Thanks! :)

  5. 5
    Fabio Salles Brazil »
    thought, on 03/Apr/08 at 2:14 pm # :

    Thank u 2!!(Ozh and Santiajo)
    This information has change my life!! &;p

  6. 6
    diego Colombia »
    replied, on 10/Apr/08 at 11:03 pm # :

    espectacular..... no entiendo porque sirve....
    Pero funciona perfecto...
    Gracias

  7. 7
    redCube Germany »
    wrote, on 11/Apr/08 at 8:49 pm # :

    In PuTTY 0.60 you can change the option "Window > Translation > Received data assumed to be in which character set:" to UTF-8. After this all received data will be interpreted as UTF-8 and displayed correctly.

  8. 8
    redCube Germany »
    replied, on 11/Apr/08 at 10:14 pm # :

    Damn, might help to read other comments first. Sorry for an allready posted solution. ;)

Leave a Reply

Comment Guidelines or Die

  • HTML: You can use these tags: <a href=""> <em> <i> <b> <strong> <blockquote>
  • Posting code: Post raw code (no <> &lt; etc) within appropriate tags : [php][/php], [css][/css], [html][/html], [js][/js], [sql][/sql], [xml][/xml], or generic [code][code]
  • Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar.
  • Spam: Various spam plugins on patrol. I'll put pins in a Voodoo doll if you spam me.
  • I will mark as Spam test comments, all comments with SEO names (ie "My Cool Online Shop" instead of "Joe") or containing forum-like signatures.

Read more ?

Close
E-mail It