Marvin Renich wrote:

> * Bram Moolenaar <[EMAIL PROTECTED]> [080821 00:55]:
> > 
> > Tony Mechelynck wrote:
> > 
> > > >> E670: Mix of help file encodings within a language:
> > > >> /usr/local/share/vim/vimfiles/doc/hicolors.txt
> > > >>
> > > >> The error is given by the :helptags command.
> > > >>
> > > >> 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.
> > > 
> > > But, is UTF-8 with BOM different from UTF-8 without BOM? And how does 
> > > ":helptags" detect the encoding used by a file?
> > 
> > Right, that should work.  But ASCII is not utf-8, and I think (without
> > looking at the code) that ASCII files default to latin1 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.

> Tony, what was fencs when you ran helptags?
> 
> Bram, if this is not currently how helptags determines fenc, would you
> consider it a bug?
> 
> It may not have been the case in the early days of Vim, but now I expect
> that utf-8 is widely used enough that the help files distributed with
> Vim should use utf-8.  Putting a BOM at the beginning of each help file
> would facilitate easy detection.  I think that using utf-8 for the
> official help files is the most reasonable way to allow everybody
> (especially script authors) to add help files that are compatible with
> the distribution.

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.

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.

-- 
You can test a person's importance in the organization by asking how much RAM
his computer has.  Anybody who knows the answer to that question is not a
decision-maker.
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui