{"id":651,"date":"2007-08-03T22:05:07","date_gmt":"2007-08-03T20:05:07","guid":{"rendered":"http:\/\/planetozh.com\/blog\/2007\/08\/how-to-display-utf8-in-your-putty-bash-shell\/"},"modified":"2008-04-11T21:23:18","modified_gmt":"2008-04-11T19:23:18","slug":"how-to-display-utf8-in-your-putty-bash-shell","status":"publish","type":"post","link":"https:\/\/planetozh.com\/blog\/2007\/08\/how-to-display-utf8-in-your-putty-bash-shell\/","title":{"rendered":"How To Display UTF8 in your Putty Bash Shell"},"content":{"rendered":"<p>I was having a few reading problems on a server I&#39;ve recently got my hands on: the locale is set to something like French UTF8, but Putty was displaying annoying <em>\u00c3\u0192\u00c2\u00a9<\/em> and stuff instead of accented characters.<\/p>\n<p>I was expecting the solution to be something linuxish like read boring man pages till I finally decide it&#39;s not worth the hassle and live with it, but it was so simple that I&#39;m still amazed. Just add the following lines (in your ~\/.bash_profile for instance:<\/p>\n<div id=\"ig-sh-1\" class=\"syntax_hilite\">\n\n\t\t<div class=\"toolbar\">\n\n\t\t<div class=\"view-different-container\">\n\t\t\t\t\t\t<a href=\"#\" class=\"view-different\">&lt; View <span>plain text<\/span> &gt;<\/a>\n\t\t\t\t\t<\/div>\n\n\t\t<div class=\"language-name\">code<\/div>\n\n\t\t\n\t\t<br clear=\"both\">\n\n\t<\/div>\n\t\n\t<div class=\"code\">\n\t\t<ol class=\"code\" style=\"font-family:monospace\"><li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\">echo -ne '\\e%G\\e[?47h\\e%G\\e[?47l'<\/div><\/li>\n<\/ol>\t<\/div>\n\n<\/div>\n\n<p>No idea why it works, if it&#39;s for bash or any shell, but well, it just works. Cool ! (<a href=\"http:\/\/www.earth.li\/~huggie\/blog\/tech\/mobile\/putty-utf-8-trick.html\">via<\/a>)<\/p>\n<p><strong>Edit:<\/strong> As a few readers commented, there&#39;s something way easier to do in your PuTTy configuration. Read comments :)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was having a few reading problems on a server I&#39;ve recently got my hands on: the locale is set to something like French UTF8, but Putty was displaying annoying \u00c3\u0192\u00c2\u00a9 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&#39;s not worth the hassle\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[5,2,3,229,228],"class_list":["post-651","post","type-post","status-publish","format-standard","hentry","category-published","tag-bash","tag-code","tag-linux","tag-putty","tag-utf-8"],"_links":{"self":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts\/651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/comments?post=651"}],"version-history":[{"count":0,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts\/651\/revisions"}],"wp:attachment":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/media?parent=651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/categories?post=651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/tags?post=651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}