Tuesday, September 25, 2012

Re: E670: Mix of help file encodings within a language

On Tue, September 25, 2012 17:58, Marco wrote:
> 2012-09-25 Tony Mechelynck <antoine.mechelynck@gmail.com>:
>
>> Well, is there a bomb on another helpfile?
>>
>> :vimgrep /\%1l/ ~/.vim/*.txt
>> :setl fenc? bomb? " watch for "utf-8" together with "bomb"
>> " or for anything other than utf-8 or latin1
>> :cn|setl fenc? bomb?
>> :cn|setl fenc? bomb?
>> :cn|setl fenc? bomb?
>
> Vim says they're all utf-8 and nobomb.
>
> I did some further experiments. The result is:
>
> The mentioned error is thrown when "one or more but not all" files
> have one or more non-ASCII characters in the *first line*. If all
> files have at least one non-ASCII character, it works fine.
> Non-ASCII characters elsewhere than the first line are not
> problematic. That's seems weird. A bug or a feature?

Yes, Vim checks only the first line for each file.

This error can happen, if the first file does not have a
non-ASCII character but any of the other files has such a
character in the first line. (In this case, Vim expects each
other file to not have multi-byte characters in the first line).

This sounds like a bug (so forwarding to vim-dev).

Also currently, Vim only checks for multi-byte or non-multibyte
characters, but doesn't care whether the encoding is different for
multibyte characters. Not sure, if Vim should do this.

regards,
Christian

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: