[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] :map and unicode
From: |
Thomas Dickey |
Subject: |
Re: [vile] :map and unicode |
Date: |
Sun, 23 Nov 2008 20:34:49 -0500 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Mon, Nov 17, 2008 at 08:45:55PM -0500, Thomas Dickey wrote:
> On Mon, Nov 17, 2008 at 08:32:59AM +0100, Christopher Illies wrote:
> > Here is an example of what happens:
> >
> > Start a new file:
> > > vile test
> > In vile set the file encoding:
> > :set file-encoding utf-8
> > ....then enter the first unicode character directly:
> > "i","^V","u","0","2","1","9","return","escape"
> > ....enter the mapping:
> > ":","m","a","p","!"," ","^V","^K","s",",","
> > ","^V","u","0","2","1","9","return"
> > ....enter the character as digraphs:
> > "i","^K","s",",","escape"
> > .... exit vile with ":wq"
> >
> >
> > Now this is how the file looks like:
> > > cat test
> > ??
> > ??????
> >
> > > hexdump test
> > 0000000 99c8 ef0a 88bf beef 0a99 000a
> > 000000b
>
> I get the same result - going on that path. But looking at the output
> from ":map!" for the working case (where I define the map in .vilerc)
> versus the non-working (where I did it interactively, as you indicate),
> I see a difference: for the latter, vile is showing the literal character
> rather than the "^Vu0219" string.
>
> If instead, I type ^V twice interactively, I do enter the same mapping.
> The mapping using the doubled ^V works...
>
> (Whether this is what it _should_ do, I'll have to investigate, but
> now I know where to look ;-).
I've gotten about half of this - part of it is a sign-extension bug (which
creates the odd characters), but after that, it seems that there's some
additional problem, which causes the UTF-8 to be inserted in the wrong order.
I'll continue to investigate.
However - just checking - on FreeBSD, you're using a port (I assume),
so my fixes probably won't be visible til a release (is that right?).
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature