Loading ...
Sorry, an error occurred while loading the content.

Re: Woe with MBCS File Names in UTF-8 Mode on Windows

Expand Messages
  • adah@netstd.com
    ... Yes, your patch works like a charm. Thanks, Bram! Best regards, Yongwei
    Message 1 of 13 , Jul 3 10:12 PM
    • 0 Attachment
      Bram wrote:
      >
      > 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.

      Yes, your patch works like a charm. Thanks, Bram!

      Best regards,

      Yongwei
    Your message has been successfully submitted and would be delivered to recipients shortly.