Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using gVim to type in a journal paper that contains a lot of occurences of the unicode characters U+0219 "s with comma below" (ș) and U+021b "t with comma below" (ț).

Both encoding and fileencoding are set to utf-8, and the GUI font I'm using, Consolas, clearly supports these characters, yet Vim shows them on screen as question marks. That wouldn't bother me too much, except it saves the file to disk with the question marks as well!

Update: Looks I can paste the character into Vim from clipboard, I just can't type it. I'm using the "Romanian (Programmers)" keyboard, and ș is bound to AltGr+s, or Ctrl+Alt+s. Could there be some keybinding conflict with gVim on Windows?

share|improve this question
up vote 0 down vote accepted

I think :he mbyte-keymap may be the answer to your problem - this has an advantage that normal mode is not using the alternative layout.

Surprisingly there is no Romanian keyboard shipped with vim, so you can use one from here

Then just set:

set keymap=romanian
share|improve this answer

It is possible to use correct diacritics characters on Windows XP, 7 by hacking Windows XP and Windows 7.

Namely using the ISO-8859-16 (code page 28606) from ReactOS and setting it as ISO-8859-2 (code page 1250).

I've described the technique and I've put screenshots here:

I've also put a video tutorial which shows how to do this on Windows XP: and on Windows 7:

Bonus you will get emacs and putty working too!

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .