How difficult to upgrade Windows UTF-8 support to use multiple charsets as on linux?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How difficult to upgrade Windows UTF-8 support to use multiple charsets as on linux?

L. A. Walsh
I was wondering if it is a feature on the list of desired features -- to have the Windows Gvim, be able to display UTF-8 characters as is done on linux and in other Windows programs?

Right now if you have a charset loaded for your Latin characters, you don't
get characters for non-latin scripts.

But if I use the TTY version of linux or the X version, I can use whatever
latin-based font (well TTY fonts-only on the TTY version), but UTF-8 chars are displayed properly in some system-fallback font.

This has been available for years on linux, but Windows is woefully far behind.

Is this something that could be done for windows?  Is it already in the plans?

Thanks!
Linda


--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: How difficult to upgrade Windows UTF-8 support to use multiple charsets as on linux?

Tony Mechelynck
On 20/06/10 13:02, Linda W wrote:

> I was wondering if it is a feature on the list of desired features -- to
> have the Windows Gvim, be able to display UTF-8 characters as is done on
> linux and in other Windows programs?
>
> Right now if you have a charset loaded for your Latin characters, you don't
> get characters for non-latin scripts.
>
> But if I use the TTY version of linux or the X version, I can use whatever
> latin-based font (well TTY fonts-only on the TTY version), but UTF-8
> chars are displayed properly in some system-fallback font.
>
> This has been available for years on linux, but Windows is woefully far
> behind.
>
> Is this something that could be done for windows? Is it already in the
> plans?
>
> Thanks!
> Linda
>
>

I wrote my tip http://vim.wikia.com/wiki/Working_with_Unicode when I was
still on Windows (Windows 98, in fact; and the wiki didn't yet exist)
and struggling with how to make Vim edit multilingual files (with, let's
say, Latin, Cyrillic, Arabic, kanji and hiragana in a single file: see
http://users.skynet.be/antoine.mechelynck/ for an example).

It is quite possible to edit files in any charset in Vim, even at the
same time, by setting 'encoding' to utf-8 at startup without changing
your Windows locale, but it may require some precautions (detailed in
that tip) and some understanding of the relevant Vim options (mentioned
in the "See also" section of the tip). Of course you need a Vim version
compiled with +multi_byte (with or without _ime) to start with, but most
versions of Vim for Windows already have that (if you aren't sure, type
":echo has('multi_byte')" without the double quotes, followed by hitting
Enter, and see what Vim answers: 0 (zero) means no, anything else
(usually 1) means yes).

To see what you are doing, you need of course to install a font (in gvim
if using GUI Vim, or in your console terminal if using Console Vim)
which includes glyphs for whatever characters you'll be using. How to
change fonts in a console terminal is out of Vim's control, and in any
case I recommend using Vim in GUI mode rather than in Console mode
whenever you have complex combinations of scripts to handle. There is a
separate tip about how to choose fonts for gvim:
http://vim.wikia.com/wiki/Setting_the_font_in_the_GUI , part of which
which was later included in the standard Vim help as ":help
setting-guifont" and part of ":help 'guifont'".

Since which fonts are installed vary from system to system, and since
aesthetic preferences and favourite languages vary from user to user,
you may perhaps have to do some trial-and-error testing before you are
fully satisfied. Since Windows is one of the GUIs where gvim can display
a font chooser, using ":set gui=*" can help somewhat. See details in the
tip.

And finally, if you use any Unicode codepoint above U+FFFF and want it
to be correctly displayed in Vim, you need Vim 7.1.116 or later. (The
current "stable" version is 7.2.444; a 7.3a alpha is also available in
source form.)


Best regards,
Tony.
--
My brother-in-law has found a way to make ends meet.  He goes around
with his head stuck up his ass.

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: How difficult to upgrade Windows UTF-8 support to use multiple charsets as on linux?

Tony Mechelynck
On 20/06/10 19:30, Tony Mechelynck wrote:

> On 20/06/10 13:02, Linda W wrote:
>> I was wondering if it is a feature on the list of desired features -- to
>> have the Windows Gvim, be able to display UTF-8 characters as is done on
>> linux and in other Windows programs?
>>
>> Right now if you have a charset loaded for your Latin characters, you
>> don't
>> get characters for non-latin scripts.
>>
>> But if I use the TTY version of linux or the X version, I can use
>> whatever
>> latin-based font (well TTY fonts-only on the TTY version), but UTF-8
>> chars are displayed properly in some system-fallback font.
>>
>> This has been available for years on linux, but Windows is woefully far
>> behind.
>>
>> Is this something that could be done for windows? Is it already in the
>> plans?
>>
>> Thanks!
>> Linda
>>
>>
>
> I wrote my tip http://vim.wikia.com/wiki/Working_with_Unicode when I was
> still on Windows (Windows 98, in fact; and the wiki didn't yet exist)
> and struggling with how to make Vim edit multilingual files (with, let's
> say, Latin, Cyrillic, Arabic, kanji and hiragana in a single file: see
> http://users.skynet.be/antoine.mechelynck/ for an example).
>
> It is quite possible to edit files in any charset in Vim, even at the
> same time, by setting 'encoding' to utf-8 at startup without changing
> your Windows locale, but it may require some precautions (detailed in
> that tip) and some understanding of the relevant Vim options (mentioned
> in the "See also" section of the tip). Of course you need a Vim version
> compiled with +multi_byte (with or without _ime) to start with, but most
> versions of Vim for Windows already have that (if you aren't sure, type
> ":echo has('multi_byte')" without the double quotes, followed by hitting
> Enter, and see what Vim answers: 0 (zero) means no, anything else
> (usually 1) means yes).
>
> To see what you are doing, you need of course to install a font (in gvim
> if using GUI Vim, or in your console terminal if using Console Vim)
> which includes glyphs for whatever characters you'll be using. How to
> change fonts in a console terminal is out of Vim's control, and in any
> case I recommend using Vim in GUI mode rather than in Console mode
> whenever you have complex combinations of scripts to handle. There is a
> separate tip about how to choose fonts for gvim:
> http://vim.wikia.com/wiki/Setting_the_font_in_the_GUI , part of which
> which was later included in the standard Vim help as ":help
> setting-guifont" and part of ":help 'guifont'".
>
> Since which fonts are installed vary from system to system, and since
> aesthetic preferences and favourite languages vary from user to user,
> you may perhaps have to do some trial-and-error testing before you are
> fully satisfied. Since Windows is one of the GUIs where gvim can display
> a font chooser, using ":set gui=*" can help somewhat. See details in the

Oops! :set guifont=*

> tip.
>
> And finally, if you use any Unicode codepoint above U+FFFF and want it
> to be correctly displayed in Vim, you need Vim 7.1.116 or later. (The
> current "stable" version is 7.2.444; a 7.3a alpha is also available in
> source form.)
>
>
> Best regards,
> Tony.
--
Bureaucrat, n.:
        A person who cuts red tape sideways.
                -- J. McCabe

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php