Hi Tony :)

 * A.J.Mechelynck <[EMAIL PROTECTED]> dixit:
> DervishD wrote:
> >    Am I doing anything wrong? Should I set another thing so even
> >    with
> >"enc=utf8" my high-bit-set-mapleader still works? Should I set
> >"mapleader" to the utf8 value?
> 
> Regarding your Subject: 'encoding' is a global option; it defines how
> the characters are represented internally in memory for _all_ buffers.

    Yes, I forgot, sorry O:))

> When you store a mapping, it is stored in the 'encoding' current at
> the moment the mapping is defined. If that 'encoding' is Latin1, the
> letter ç (small c-cedilla) is stored as the single byte 0xE7.

    That's what I assumed.

> After ":set encoding=utf-8", the byte 0xE7 is invalid unless it is
> immediately followed by two bytes in the range 0x80-0xBF. The small
> c-cedilla is still the codepoint U+00E7 but that codepoint is now
> represented in memory as the two bytes 0xC3 0xA7.
> 
> Therefore, you should set 'encoding' early in your vimrc, as follows:

    And this I cannot do... I wanted to avoid considering ASCII files as
utf-8, therefore my "fileencodings" is empty. By default, "enc" is
latin1, and I only change it, by hand (well, with a mapping) the 1 in
10000 times I edit an utf-8 file that doesn't have a BOM mark. I do this
by setting, manually, "enc". My error was to consider "enc" local to the
buffer and not global.

    So it looks like I will have to choose an ASCII-7 mapleader (my
first option) OR add new mappings as soon as I "set enc=utf-8" using a
new value for leader.

    None of the solutions is a great deal, anyway.

    Thanks a lot for your fast and good answer, as always :))

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

Reply via email to