Re: Unicode support for Windows console
- On 07/11/2007, Fan Decheng <dtsfan@...> wrote:
>Yes Code page 65001 support seems quite flaky both at the API level
> hippytrail@... 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.
> > Andrew Dunbar.
> > >
> Strange. I tried chcp 65001, and then typed
> dir | more
> and see:
> C:\Documents and Settings\Fan Decheng>dir |more
> Not enough memory.
> I don't know what happened. Also, many other programs doesn't work
> either. After chcp 936 (switching back), it works all right.
and at the level of support from Micosoft's own basic command line tools.
It's clear that I shouldn't persue a UTF-8 Windows console.
Unicode console support in general is a little better though. If you
create some files with Russian or Greek names, the filenames will be
displayed by dir, but piping to more will mung them.
I'm still interested in getting Vim out of the "more" category and into
the "dir" category (-:
> Fan Decheng
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php