* 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.

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.

...Marvin


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

Raspunde prin e-mail lui