vile
[Top][All Lists]
Advanced

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

Re: [vile] How to convert \?nn strings to characters?


From: Thomas Dickey
Subject: Re: [vile] How to convert \?nn strings to characters?
Date: Mon, 1 Nov 2010 16:59:21 -0400 (EDT)

On Mon, 1 Nov 2010, Thomas Dickey wrote:

On Mon, 1 Nov 2010, Chris G wrote:

I have a number of files created a long time ago which have 'extended
ASCII' characters in them which are encoded in a way that vile doesn't
understand (at least the way I have it set up it doesn't).

They appear as follows in vile and xvile:-

   \?B1       \?B9      \?A1

the four character sequence above is what vile/xvile shows for a single byte of my files. Is there any way I can get vile/xvile to recognise and display these characters and/or a way to get the files saved in a more currently recognised
encoding.  All my current systems use a UTF-8 locale.

If your system has the corresponding 8-bit locale installed, then

:setl fk=8bit

for the given buffer should should the characters as you intended.
                              show

For _saving_ in a different encoding... vile doesn't really do
that (recode can do it).

vile could be made to automatically convert 8-bit encoding to UTF-8
as it reads a file (not a hard change).  Currently it just reads
data into a buffer assuming that everything matches.

Going the other way is harder of course, except for the trivial
cases of ASCII and ISO-8859-1.

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



reply via email to

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