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

Re: windows and unicode filenames, etc.

Expand Messages
  • Glenn Maynard
    ... Eh. I ll just add enc_codepage. -- Glenn Maynard
    Message 1 of 6 , Aug 5, 2002
    • 0 Attachment
      On Mon, Aug 05, 2002 at 03:50:46PM -0400, Glenn Maynard wrote:
      > > Isn't it easier to ignore enc_dbcs where the code needs to be used for
      > > both encodings?
      >
      > Perhaps there should be a single function, win_get_penc_codepage(),
      > which does all of that parsing and returns the codepage (or -1 if it's
      > not a codepage)?
      >
      > Also, the is_funky_dbcs code in the win32 renderer should use this, too,
      > since it needs to do the same thing. (Render with Unicode conversion if
      > win_get_penc_codepage() != GetACP(); then is_funky_dbcs can probably go
      > away, too, since nothing else uses it.)

      Eh. I'll just add enc_codepage.

      --
      Glenn Maynard
    • Glenn Maynard
      ... Right. That s what I m doing, with a fallback for 9x. ... We have the same idea. I ll do this. ... I think it s just returning a system-wide constant,
      Message 2 of 6 , Aug 5, 2002
      • 0 Attachment
        On Mon, Aug 05, 2002 at 10:17:17PM +0200, Bram Moolenaar wrote:
        > I think it so far only worked for text in the system codepage. When
        > setting 'encoding' to something else I would guess we don't convert,
        > thus you end up with nonsense. Converting the title to Unicode should
        > work (if the wide version of the function is available, might not be
        > true on Win 9x).

        Right. That's what I'm doing, with a fallback for 9x.

        > Ah, you are running into the problem that enc_dbcs is both used as a
        > flag that DBCS encoding is being used and the number of the codepage
        > used for 'encoding'. We could separate the two to avoid confusion.
        > Introduce enc_codepage perhaps?

        We have the same idea. I'll do this.

        > > Also, the is_funky_dbcs code in the win32 renderer should use this, too,
        > > since it needs to do the same thing. (Render with Unicode conversion if
        > > win_get_penc_codepage() != GetACP(); then is_funky_dbcs can probably go
        > > away, too, since nothing else uses it.)
        >
        > If GetACP() is really fast, then is_funky_dbcs becomes obsolete.
        > Otherwise, I thought you were planning to rename it anyway.

        I think it's just returning a system-wide constant, but I'll run a quick
        speed check anyway.

        --
        Glenn Maynard
      Your message has been successfully submitted and would be delivered to recipients shortly.