Re: Woe with MBCS File Names in UTF-8 Mode on Windows
- Bram wrote:
>Yes, your patch works like a charm. Thanks, Bram!
> Yongwei wrote:
> > I have finally found out the reason. The cause is the _fullpath
> > (which finally calls GetFullPathNameA) in mch_FullName. It is quite
> > normal that the non-Unicode Win32 API requires that file names
> > should be provided in native encoding.
> > Non-DBCS-system users generally will not feel the problem since
> > valid UTF-8 code points are generally valid SBCS (say, Latin1) code
> > points, and 炜.txt will be regarded as code points |e7 82 9c 2e 74
> > 78 74|. On DBCS systems, |9c2e| is invalid and will become `?'
> > (|3f|).
> > To solve this problem, maybe Vim needs to provide its own verion of
> > fullpath? Bram, what is your opinion?
> I'm glad you were able to isolate the problem.
> Vim 7 already included a fix for this. This has been tried out for a
> while now, thus I think it's safe to include in Vim 6.3. Please try
> out this patch. If it works OK for you then I'll release it.