Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I open gVim it's localized to Sweidish, which is fine. But warning/error messages that has Swedish characters in them don't display correctly. When trying to delete a buffer with unsaved changes for example I get this:

E89: Ingen skrivning sedan senaste <e4>ndring f<f6>r buffert 1 (l<e4>gg till ! f<f6>r att tvinga)

Which roughly translates to

E89: No write since last edit for buffer 1 (append ! to force)

What I want is this:

E89: Ingen skrivning sedan senaste ändring för buffert 1 (lägg till ! för att tvinga)

These are a couple of relevant settings:

> :language
  Aktuellt spr<e5>k: "LC_COLLATE=Swedish_Sweden.1252;LC_CTYPE=C;LC_MONETARY=Swedish_Sweden.1252;LC_NUMERIC=C;LC_TIME=Swedish_Sweden.1252"
> :lang mes
  Aktuellt message spr<e5>k: "SV"
> :set enc
  encoding=utf-8

How do I make vim display the proper characters (å, ä, ö) instead of the <e5>, <e4>, <f6> codes?

EDIT: Trying :language sv_SE.UTF-8" I get E197: Can not set the language to "sv_SE.UTF-8

EDIT2: I have tried:

:language Swedish_Sweden.10646
:language sv_SV.UTF-8
:language en
:language en_EN.UTF-8

All with the same E197 error message.

share|improve this question

2 Answers 2

up vote 8 down vote accepted

I solved it. It was actually hinted at on the vim web page. http://www.vim.org/download.php#pc

I had to get two files from the gettext project on sourcforge:

Extract bin/iconv.dll from the libiconv zip and bin/intl.dll from the gettext zip in to your gVim/vim folder. Rename intl.dll to libintl.dll. Overwrite any existing files.

After that it just worked for me. These are the relevant lines from my _vimrc:

if has('gui_running')
    set guifont=Courier_New:h10
endif

set encoding=utf-8

They are placed at the top of _vimrc.

share|improve this answer

If I do ":lang sv_SE.UTF-8" then the messages show up correctly for me, but this is under Linux and I'm not sure if that will work in Windows.

share|improve this answer
    
When I try that I get: 'E197: Can not set the language to "sv_SE.UTF-8"' –  Tobbe Nov 5 '10 at 5:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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