You are not logged in.

#1 2009-01-23 21:45:11

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

[SOLVED]Putty config, character encoding, and locale issue, what's...

does anyone use Putty to ssh into their arch box?

after extensive trial and error i've discovered this...

if i have LC_ALL=C and putty's translation set to ISO-8859-1 (whatever the default is) then all of the line drawn characters in mutt, ncmpcc, and wyrd show up correctly; however, no non-standard characters (accented e's etc) print, obviously.

setting LC_ALL=en_US.utf8 fixes the nonstandard characters but screws up the line drawn characters

various googles bring up many-a midnight commander fixes for line drawn characters; change putty's translation setting to UTF8 etc etc; i've tried them all

with those fixes in place, the lines look perfect in mutt; however, in ncmpcc they are all qqqqqqqqqaaxxxx and in wyrd it's half and half; some lines print others are xxxxqqqaxxqqq.

so, if anyone uses putty to ssh into their arch box please check that all your characters show properly and then let me get your LC_ALL and putty config settings?

thanks
pat

PS. everything looks fine when accessed on a local terminal emulator (xterm, urxvt, etc) it's only putty, and only half of the line's in half of the programs that are giving me problems

Last edited by brisbin33 (2009-01-26 14:55:32)

Offline

#2 2009-01-26 14:43:13

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED]Putty config, character encoding, and locale issue, what's...

ok, change the question a bit... is there a way to set up .bashrc so that it exports one LC_ALL if i'm coming in with Putty and another LC_ALL for all other cases?

Offline

#3 2009-01-26 14:54:28

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED]Putty config, character encoding, and locale issue, what's...

ok... solved, on my own; yay.

.bashrc

if [ "$TERM" = "putty" ]; then
  export LC_ALL=C
else
  export LC_ALL=en_US.utf8
fi
...
export TERM=xterm
...

and in putty, Window > Translation > Charset: the default ISO-8859-1, and under Connection > Data > Terminal type string "putty"

put the if/then statement first to export the correct LC_ALL then put the export TERM statement after that so everything else looks right

sweet

Offline

#4 2009-03-08 15:25:22

sveinemann
Member
Registered: 2007-09-30
Posts: 108

Re: [SOLVED]Putty config, character encoding, and locale issue, what's...

thank you for this, i write raw html trough putty and the output html ended up with utf encoding. Didnt look nice in firefox.  Thanks!

Offline

Board footer

Powered by FluxBB