2

i am using vim latest version (as my main text editor), however, the encoding for keyboard language, other than english, doesn't work.

in every other editor encoding is fine (notepad, ultraedit, notepad++, ...). these characters aren't displayed properly:

  • č
  • ć
  • š
  • đ
  • ž

i think that is windows problem, even if every other editor works.

  • what is the OS you are using? – akira Sep 18 '10 at 19:02
  • i am using win xp... – aksr Sep 19 '10 at 14:28
  • 1
    Do you mean input of special characters isn't working, or display of special characters is wrong? – Heptite Oct 8 '10 at 20:56
  • Im seeing this problem - but only when pasting into vim. I'm using vim from powershell. The existing unicode in the file is displayed fine but I have to paste through notepad++ :( – JonnyRaa Mar 11 '15 at 12:21
0

there are 2 aspects of this problem:

  1. how are the bytes stored onto the disk ('encoding')
  2. how are the bytes displayed on the screen

the first issue obviously influences the 2nd, but do not confuse the two.

if some characters are not displayed properly then most of the time there is not an 'encoding' problem but that the user picked a font which has no visual representation available for the bytes.

:echo &guifont 

tells you your current font. you could find out which fonts are used in the other, 'working' editors and then pick the same for vim.

1

I have had the same problem and the only way I could solved the problem is by creating windows batch file e.g. vim.bat and stored the following commands in it:

@echo off
chcp 1250 > nul:
"C:\Program Files\Vim\vim73\vim.exe"

Then double click on vim.bat to start a vim editor. You can also create shortcut to the vim.bat file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.