Setting the language

61 views
Skip to first unread message

Axel Bender

unread,
May 19, 2019, 2:10:54 PM5/19/19
to vim_use
How would I set the language to en_US.UTF-8 via the "language" command in Windows gvim?

Christian Brabandt

unread,
May 20, 2019, 1:57:52 AM5/20/19
to vim_use

On So, 19 Mai 2019, Axel Bender wrote:

> How would I set the language to en_US.UTF-8 via the "language" command
> in Windows gvim?

I am not sure why you want UTF-8 in Windows, it seems the more widely
used codepage in use is 1252 (for western countries).
UTF-8 Codepage in Windows is 65001, however it seems like setting that
via the language command does not work, at least not on my system here:

So try:

lang English_USA.1252
lang mes English_US.1252

Or don't explicitly care about the encoding and use
:lang English_USA
:lang mes English_USA


Best,
Christian
--
Wähl dir eine, der du sagst: Du nur gefällst mir allein.
-- Ovid (43 v.Chr.-18 n.Chr) (Liebeskunst)

Axel Bender

unread,
May 20, 2019, 2:52:09 AM5/20/19
to vim_use
@Christian,

Thanks for your reply.

Is there any reason why anyone would not want UTF8? (just joking...)

That's exactly the problem, I can't set the language to UTF-8 for the various types (messages, ctype, time) in Windows.

language english_United States.1252 works (but is not what I want).
language english_United States.65001 (which represents UTF-8 in Windows) doesn't (as does english_United States.UTF-8 or english.United States.utf8), which all result in E197 being thrown.

I see no other way to influence the collation for sorting regions, e.g. with
'<,'>sort than setting the language...

I explicitly do not want Windows 1252.

Ken Takata

unread,
May 20, 2019, 3:07:32 AM5/20/19
to vim_use
Hi,

If you want to use UTF-8, write the following line in your .vimrc (_vimrc):

set encoding=utf-8

:language cannot be used for setting the encoding.

Regards,
Ken Takata

Axel Bender

unread,
May 20, 2019, 5:16:49 AM5/20/19
to vim_use
@Ken

Thanks for the reply.

set encoding=utf-8 is my default setting...

However, in Windows:
- how can I influence the values of v:lc_time, v:lang, and v:ctype?
- how can I influence the way the internal sort command sorts (in Linux - having set $LC_ALL to "de_DE.UTF-8") sorting works with /bin/sort.

Questions over questions... ;-)

Ken Takata

unread,
May 20, 2019, 5:52:44 AM5/20/19
to vim_use
Hi,

The internal sort doesn't affected by the locale.

Regards,
Ken Takata

Reply all
Reply to author
Forward
0 new messages