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

36785Re: Extended ASCII characters garbled in Vim 6.3b [Win32 console]

Expand Messages
  • Antoine J. Mechelynck
    Jun 3, 2004
      Bram Moolenaar <Bram@...> wrote:
      > Antoine J. Mechelynck wrote:
      > > Are you sure it's 1252? When I set 'enc' to "utf-8" in gvim, then do
      > > ":view ++enc=cp1252 upascii.txt" (the file I sent with my previous
      > > post), then "setl fenc?" the answer is "cp437"... Apparently, when
      > > told to use code page 1252, gvim uses 437 instead.
      > If you have already opened a file, then another edit command will use
      > the same buffer. You can't have two buffers for the same file (that
      > would be very confusing).

      Hmm. As long as I don't hide buffers, I don't feel the confusion; but I
      suppose it would be confusing to Vim, inasmuch as the "identity" of a buffer
      lies in its name. I just thought of displaying, how shall I call it? ("view"
      is already a Vim technical term) two different "aspects" of a file in a
      single instance of gvim, which can be done in other circumstances, like
      left-to-right vs. right-to-left, and IIRC folded vs. unfolded. Well in any
      case, the workaround isn't hard to find (use ":saveas to copy the file,
      giving the buffer a different name; then reopen the original file in
      split-wndow with different options).
      > Perhaps a warning about the "++enc" argument being ignored would be
      > appropriate? It's confusing, because when you do the same command
      > again while already editing the buffer, the buffer _is_ reloaded.
      > That's because you indicate you want to re-edit the file.

      That is obvious in retrospect.
      > Another possibility would be to reload the file, so that other windows
      > show the buffer also with the new encoding. This is then only to be
      > done if the "++enc" argument differs from 'fileencoding'.

      I suppose this latter option can certainly be used if the buffer in question
      is not displayed in a window other than the one where the file is to be
      newly displayed (e.g., if it's hidden). What to do when the buffer /is/
      displayed in another window is less clear to me. If the current behaviour is
      kept unchanged, then I suppose a note in the help (under ++opt and maybe
      elsewhere) would be in order. But maybe reloading the file (with the usual
      caveats about "abandon") would be the thing to do -- less confusing, as you
      > --
      > This planet has -- or rather had -- a problem, which was this: most
      > of the people living on it were unhappy for pretty much of the time.
      > Many solutions were suggested for this problem, but most of these
      > were largely concerned with the movements of small green pieces of
      > paper, which is odd because on the whole it wasn't the small green
      > pieces of paper that were unhappy.
      > -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
      > /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net
      > \\\ /// Sponsor Vim, vote for features --
      > http://www.Vim.org/sponsor/ \\\ \\\ Project leader for
      > A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help
      > AIDS victims -- http://ICCF.nl/click1.html ///

      Best regards,
    • Show all 13 messages in this topic