[ale] Odd ascii characters in vi?

Fulton Green ale at FultonGreen.com
Thu Apr 11 23:37:12 EDT 2002


Smarty-pants answer: those aren't ASCII characters, since the ASCII standard
only covers 7-bit characters up through 0x7F.

Realistic answer: If you're using a PC, the old trick is to convert the hex
into decimal, then enter that number on the numeric keypad (NOT the numbers
that appear above the letters) while holding down the Alt key.
Unfortunately, something about vim seems to be returning a less-than-
desirable answer for 0x95. I keep seeing a Control-G character. I'm assuming
that 0xB7 resolves to a centered dot (dot-product character, perhaps?).

You might be better off inserting the chars you need with a binary editor
(hexedit, maybe?) then editing the rest with vi[m]*.

And I'm assuming that you know that the rendering of characters 0x80 through
0xFF is dependent on the rendering environment. The hex value will most
likely be rendered differently from a Macintosh to a PC console to an ISO
Latin-1 to maybe even Unicode (which might actually use Latin-1 for its
UTF-8 bytestream subset).

If you're doing an HTML page by chance, you can actually use special
character sequences, either by explicit Latin-1 hex codes or, better yet,
using the predefined symbols. For example, "γ" tells the browser to
show the lowercase Greek letter Gamma. RTFM at www.w3.org .

On Thu, Apr 11, 2002 at 11:16:20PM -0400, Allan Neal wrote:

> Does anyone know of a way to enter odd ascii characters into a text document
> using vi (vim)?
> 
> examples (0xB7, 0x95)

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list