Yakov Lerner wrote:
On 7/16/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
Yakov Lerner wrote:
> On 7/14/06, James Vega <[EMAIL PROTECTED]> wrote:
>> On Fri, Jul 14, 2006 at 02:29:49AM +0300, Yakov Lerner wrote:
>> > I always had this line in my vimrc:
>> >       exe "set listchars=tab:\xbb\xb7,trail:\xb7"
>> > (It is equivalent to set listchars=tab:»·,trail:·)
>> > Suddenly his line stopped working. (I didn't change it)
>> > It assigns now empty value to listchars:
>> >        set listchars?
>> >        listchars=tab:,trail:
>> >
>> > Command L=line  :set listchars=tab:»·,trail:·
>> > stopped to work, too.
>> > It prints E474: Invalid argument: listchars=tab:»·,trail:·
>> >
>> > What can be causing this ?
>>
>> It sounds like you're running Vim in an environment that doesn't
>> understand those characters.  You'll probably want to check what
>> 'encoding' is.
>
> Encoding is latin1.
>
> Yakov
>
>
>

This does sound like using Vim with UTF-8 'encoding' in the one case,
some 8-bit 'encoding' in the other case. Or vim 7 in one case and vim 6
or earlier in the other. Check it: place the cursor in your vimrc, then

        :echo version
        :verbose set encoding? fileencoding?

You're right Tony, thanks. The fileencoding was utf-8 in one case and
empty on the other case.  I normally work with $LANG==C.
I didn't notice that $LANG was set to en_US.UTF-8 which
caused the problem. BTW I did place 'scriptencoding' into the
script but that didn't help. Wasn't 'scriptencoding' supposed to fix the
problem ? It didn't.

Yakov




I'm not sure. If your vimrc is in Latin1, then the two weird characters you used for the "tab:" suboption are illegal as single bytes in UTF-8 (where codepoints above U+001F are represented by two or more bytes). Try

        scriptencoding latin1

at the top of your vimrc. Or else, if you never edit non-Latin1 files, a more drastic solution would be

        if &termencoding == ""
                let &termencoding = &encoding
        endif
        set encoding=latin1

If one of the above doesn't work, try the other. (You should also check with ":setlocal fenc?" and if necessary ":setlocal fenc=latin1" that Vim and you agree on the vimrc's 'fileencoding'.) (I remember having the same kind of trouble some time ago with "set list listchars=tab:\ \ ,eol:¶" where ¶ is also above 127.)


Best regards,
Tony.

Reply via email to