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

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1481
Joined: Fri Aug 29, 2003 8:39 pm

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

Post 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")
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply