Andrew Sunbar wrote:
> 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. As far as I know nearly nobody uses cp65001. Vim doesn't support it. I don't know if it would work when Vim would support is. The MS-Windows console is known to be flaky. Input through Unicode (UTF-16) should work, but I don't know of people actually using it. Most non-Asian character sets are 8-bit. Asians use DBCS encodings. So when would UTF-16 be used? -- >From "know your smileys": :q vi user saying, "How do I get out of this damn emacs editor?" /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
