Re: Woe with MBCS File Names in UTF-8 Mode on Windows
Bram Moolenaar <Bram <at> moolenaar.net>
2005-07-01 09:41:23 GMT
Yongwei wrote:
> > > BTW, the strange problem seems in the three Chinese characters.
> > > `:e æµè¯.txt' and `:e è¯ä»¶.txt' both are OK.
> > > However, some other characters in the file name can become corrupt
> > > when saving the file, e.g., ç (e7829c in UTF-8, ecbf in
> > > GBK) will become ç? (c3a7 c282 in UTF-8). I have no clue how it
> > > comes.
> >
> > I'm afraid I also don't know. Perhaps there is some problem with
> > conversion from Unicode to your current codepage. This uses the
> > MS-Windows library functions, thus it's not something I can fix.
>
> I did a trace into Vim, and I found that it was because the `9c' of
> e7829c (ç) had been lost before mch_open is called. Could
> this give you a clue? Or give me a guidance where I should
> investigate further?
I would guess that somewhere in the code the DBCS codepage is used to
locate the character, instead of using it as UTF-8. Since I don't have
a DBCS system, I can't try this.
If you are able to see what happens in a debugger then you should be
able to follow the route from typing the command to the mch_open() call.
--
--
Some of the well know MS-Windows errors:
ETIME Wrong time, wait a little while
ECRASH Try again...
(Continue reading)