Long time Vim user, first time hacker.

I've recently noticed that although the Windows console has supported
Unicode since Windows 2000,
Vim for the Windows console doesn't yet support Unicode.

There are two ways to write Unicode to the Windows console: Native
Windows UCS-2/UTF-16
accessed via Windows's ...W APIs and UTF-8 accessed via Windows's ...A
APIs after setting the
console's code page to UTF-8. I'm assuming the latter method will be
easier for Vim.

To see how Vim currently behaves in UTF-8 here are the steps:
>From the Start menu choose "Run"
Enter "cmd /u" (this makes the console filehandles pipes etc work with
Unicode)
Type into the console "chcp 65001" (this sets the code page to UTF-8)
Change the terminal font to a Unicode font: Right click title bar,
Properties, Font, Lucida Console.
Now run Vim.

Even at startup the display is corrupt. My first guess is a
discrepancy between number of bytes and number of characters in
displayed strings. Note that :set termenc=utf8 and :set enc=utf8 have
no effect.
Note also that attributes (colours) and input seem to work fine.

I'm just feeling my way around the Vim code so far but os_win32.c /
write_chars() has caught my eye.
Perhaps somebody on this list can direct me where else to look in the
code.

Andrew Dunbar.


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui