Page 1 of 1

vim displays weird characters when using UTF-8 (unicode)

Posted: Fri Mar 21, 2008 3:39 pm
by ^rooker
[PROBLEM]
After changing vim's settings to Unicode:

Code: Select all

set fileencoding=utf-8
set fileencodings=utf-8
set encoding=utf-8
set termencoding=utf-8
I was unable to enter any umlaut characters (like "ö ä ü"). They appeared like this on my screen:
ö ä ü

[SOLUTION]
My terminal client (in this case "PuTTy") was not expecting unicode characters, but still iso-8859-1 (latin1).

So check your terminal's encoding. In PuTTy it's in:
"Window > Translation > Character set translation on received data"


:idea: TIP: (On Windows: You can change/check in realtime if you right-click on the icon in the upper-left corner of the putty window and select "change settings")