On Wednesday, January 1, 2014 8:16:12 PM UTC+8, Andre Sihera wrote:
> On 01/01/14 19:59, Stephen Lee wrote:
> 
> > On Wednesday, January 1, 2014 6:15:18 AM UTC+8, LiTuX wrote:
> 
> >> Since msys-bash has the same issue, while msysgit's bash fixed it, I think 
> >> there must be some way to fix this issue. So will anyone post a patch?
> 
> > Actually the mechanism is like that:
> 
> > IME(unicode) -->  Console(CP936) -->  vim(any codepage or utf-8)
> 
> >
> 
> > IME generates unicode characters, which tossed away by Windows Console 
> > because it can only accept codepages. Therefore you will see "different" or 
> > "corrupted" characters appear in vim.
> 
> >
> 
> > This is a "live long" problem of Windows console in all versions of 
> > Windows, which Microsoft never care to fix in the past, now, or in the 
> > future.
> 
> 
> 
> It is not an age-old problem with Windows.
> 
> 
> 
> The Windows Console deals in code pages (e.g. 932) by so that it can 
> 
> offer output
> 
> that is compatible with programs that don't drive the console properly. 
> 
> This mode
> 
> is called "(M)ulti(B)yte (C)haracter (S)et" mode (or MBCS) in the 
> 
> C/Windows APIs.
> 
> 
> 
> Console applications that drive the console and I/O streams properly can 
> 
> write
> 
> Unicode directly to the console (taken from IME or from another source) 
> 
> and it
> 
> appears correctly.
> 
> 
> 
> My environment is Japanese and I write console programs in Unicode all 
> 
> the time
> 
> and they work perfectly. Therefore it is possible to make console ViM to 
> 
> take IME
> 
> input and have it appear correctly.
> 
> 
> 
> 
> 
> > So when using vim under Windows environment, please use gvim, which bypass 
> > the trouble:
> 
> > IME(unicode) -->  gvim(unicode or utf-8)
> 
> >
> 
> > Cheers
> 
> >

It is an old-age problems for windows.

I know what is MBCS, and I know Windows console can output unicode without 
problem. You can write any unicode directly to the console and it will display 
correctly.

What I means is it has no unicode input. Please try this by yourself:

Use windows console in cp936 to display japanese file with the katakana middle 
dot "・". This dot does not exist in cp936 but only exist in japanese 
(cp932).
Try to rename the file, or make a batch file change the filename or anything 
else with variables like %1,%2,etc, quoting the japanese file name.

You will find that you cannot because the console in cp936 does not understand 
the dot in cp932.

Please remember that NTFS uses unicode to store file names.

People in other forums have been discussing this issue long ago, and they also 
found that there is not such cp65001 (or utf-8) or cp65000 (or unicode) for the 
console to handle universal filename problems.

The only is to, like you said, making applications which drive the output part 
of console and let it display unicode. For the input part, Windows console can 
still only take in codepages, except utf-8 or unicode.

Windows console is still lacking a easy way to handle multilingual filenames 
like Linux console does.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui