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

Re: Bug or feature? E670

Expand Messages
  • Marvin Renich
    [Sorry for the late response] * Bram Moolenaar [080821 21:14]: [generous snipping] ... Utf-8 is rare on Windows, but Unicode (UCS-2) is
    Message 1 of 10 , Aug 29, 2008
      [Sorry for the late response]

      * Bram Moolenaar <Bram@...> [080821 21:14]:
      [generous snipping]
      > Marvin Renich wrote:
      > > * Bram Moolenaar <Bram@...> [080821 00:55]:
      > > >
      > > > Tony Mechelynck wrote:
      > > >
      > > > > >> Bug or feature?
      > > > > >> 1. Why should it be an error to have various help files from different
      > > > > >> sources in $VIM/vimfiles/doc, some in UTF-8 with BOM, and others in
      > > > > >> US-ASCII with of course no BOM but otherwise readable as UTF-8?
      > > > > >
      > > > > > Because the tags file can only be in one encoding.
      > >
      > > I would have expected :helptags to use the current value of 'fencs',
      > > which, if encoding=utf-8, defaults to ucs-bom,utf-8,default,latin1,
      > > which should favor utf-8 over latin1.
      > No, because the help files encoding doesn't change between systems, they
      > are written mostly in latin1. 'fencs' is for user files, not for the
      > runtime files that come with Vim.
      > Utf-8 is only widely used on Linux systems. Most other systems use a
      > wide variety of encodings. It's quite rare on MS-Windows.

      Utf-8 is rare on Windows, but Unicode (UCS-2) is fully supported by all
      modern versions of Window, even if many systems are configured to use an
      8-bit NLS by default.

      > Many Vim executables are build without the utf-8 support, especially the
      > minimal Vi that comes with Linux. Defaulting to utf-8 causes quite a
      > bit of trouble.

      Okay, I can definitely understand wanting help to be available for
      minimal builds of Vim without utf-8 support.

      My reason for suggesting to use utf-8 for official help files was to
      make it easy for users to add help files in any language without
      triggering the error message reported by the OP (Tony) when using the
      :helptags command.

      Reading farther down in :help help-translated, it says that help files
      must be in latin1 or utf-8 encoding. I think this should be duplicated
      under :help write-local-help.

      As Tony points out, fencs _is_ used when _reading_ the help files. If
      this is the case, does it matter if the encoding of the tags file
      doesn't match the encoding of the help file? Isn't each of the help
      file and tags file translated independently to the current 'encoding'
      using 'fencs' before the pattern in the help file is used to search for
      the tag in the local help buffer? If this is the case, can we simply
      allow :helptags to accept ++enc to specify the output format of the
      generated tags file? The tags files included by distributions should
      still try to use latin1, so that standard help is available from
      non-utf-8-enabled vim, but system-local and user-local help files can
      mix latin1 and utf-8 if desired (in separate files, of course),
      generating a utf-8 tags file.


      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.