vile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] Making UTF-8 default


From: Thomas Dickey
Subject: Re: [vile] Making UTF-8 default
Date: Wed, 19 Mar 2008 11:39:15 -0400 (EDT)

On Wed, 19 Mar 2008, Chris G wrote:

On Wed, Mar 19, 2008 at 10:24:40AM -0400, Thomas Dickey wrote:
On Wed, 19 Mar 2008, Chris G wrote:

How do I tell vile (9.6) to default to utf-8 encoding?  Or does it do
this automatically if the locale is set to utf-8?

You can put this in your .vilerc

set file-encoding=utf-8

It's set to use "auto" now, which allows it to decide whether it looks like
utf-8 or not.  That works reasonably well for utf-8.  For utf-16,
it's harder (for that, there's the percent-utf8 setting to tweak).

OK, I have done that, but it doesn't produce the result I want (at
least it doesn't seem to).  What I want is that when I enter
characters like the GB pound sign they are put into my file correctly
utf-8 encoded.  What's actually happening is that I'm still gettting
the 8-bit pound sign (as in ISO-8859-1).

well - there's the simple part (vile's expecting UTF-8 input) and the
complicated part (if the terminal isn't delivering UTF-8, you can enter
codepoints as \uXXXX values).  I'd check that the terminal's delivering
utf-8 first.


As it is if I hit the GB pound key I get an invalid utf-8 character
although vile displays it correctly but if I  'cat' the resulting file
it displays as inverse video ?.  I can only enter valid pound signs
by the clumsy ^VuA3 sequence.

I know that (my) xterm delivers UTF-8 for the keycodes in utf-8 mode.
Other terminals differ.  iirc, you're using rxvt.  The rxvt-unicode
flavor is supposed to work (though I've only tested its display output,
not the input).

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]