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.
> 
> After investigation, it appears that all the *.txt files in 
> $VIM/vimfiles/doc are in UTF-8 (or can be read as UTF-8), which is my 
> current 'encoding'; the file which sorts before the one in the message, 
> however, is the only one with a BOM (the file has just been created by 
> UseVimball). (The files in that directory are Rndm.txt, hicolors.txt, 
> hicolorshelp.txt, a softlink to matchit.txt, and a tags file.) It also 
> appears that the error has truncated the tags file to zero-length.
> 
> I removed the BOM, and then ":helptags $VIM/vimfiles/doc" generated a 
> tags file with no error.

Sounds like a minor problem with vimball.

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

> 2. Shouldn't the E670 message mention which (incompatible) encodings it 
> found? At least the first two?

This is an unusual error, no effort was made to explain it.

> 3. Rather than give an E670 error, couldn't the :helptags command 
> generate a tags file in UTF-8 when 'encoding' is set to UTF-8, which 
> ought to be able to represent anything, even if I happened to have 
> helpfiles in mixed encodings -- let's say something as innocuous as 
> US-ASCII, Latin1 with accents, and UTF-8 with BOM? (Note that in the 
> above case, this would have given the correct tags file in US-ASCII.)

No, because the tags file contains search commands which will fail to
find the tag when the encoding was changed.  Vim could convert all doc
files to one encoding to make the tags file, but when you get info from
the tags file there is no clue about what encoding the help file is, so
to what to convert back to.  Well, with more effort it could probably
made to work, but that code doesn't exist.

> 4. If the :helptags command ends in an error, shouldn't it preserve any 
> preexisting tags file (let's say by some procedure analogous to what 
> 'writebackup' does)?

Just run it again.  Generated files don't really need to be saved, you
can generate them again.

-- 
Back off man, I'm a scientist.
              -- Peter, Ghostbusters

 /// 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