[gnu.emacs] 8 bit characters

pausv@sssab.se (Paul Svensson) (09/11/89)

I want to use emacs with 8-bit characters, but I cannot find out how to do
it.  If I don't set the meta-flag, the eighth bit is simply stripped off.
If I set the meta-flag, I have to use ^Q get 8-bit characters in, and then,
when I whip up a macro to insert them properly, the <ESC> prefix commands
stops working, inserting funny characters also.  And all the time emacs
displays the 8-bit characters as \217 and \242 and such.

My reading of the documentation does not offer any sulution, in fact it
leads me to the conclusion that emacs is 7-bit sick.  PLEASE someone tell
me that this is not so, and flame me about overlooking the obvoius solution,
or I will seriously consider converting to (shudder) vi.

			/Paul

-- 
Paul Svensson    Scandinavian System Support    Phone:  +46-(0)13 111660
paul@sssab.se    Box 535       _		Fax:	+46-(0)13 115193
		 S-581 06  Linkoping

jbw@bucsf.bu.edu (Joe Wells) (09/11/89)

In article <1989Sep10.172226.5865@sssab.se> pausv@sssab.se (Paul Svensson) writes:

   I want to use emacs with 8-bit characters, but I cannot find out how to do
   it.  If I don't set the meta-flag, the eighth bit is simply stripped off.
   If I set the meta-flag, I have to use ^Q get 8-bit characters in, and then,
   when I whip up a macro to insert them properly, the <ESC> prefix commands
   stops working, inserting funny characters also.  And all the time emacs
   displays the 8-bit characters as \217 and \242 and such.

I assume you mean that your terminal will display 8-bit characters as
useful symbols and you wish to use this capability.  You also wish to type
these 8-bit characters into files.

First, the output side.  You must modify the function display_string in
src/xdisp.c to output the 8-bit characters instead of an escaped octal
number (things like "\234").  It will be clear to any C programmer how
to do this.

Second, the input side.  Unfortunately for you, when looking up key
bindings, Emacs converts a character with the 8th bit set to two
characters: the current value of meta-prefix-char followed by the original
character with the 8th bit turned off.  Since I assume you wish to
continue using all of the meta commands, you must either access them
through a different prefix than ESC, or you must change meta-prefix-char
to deal with 8-bit input separately.  Either way, you need to rearrange
keymaps.

   My reading of the documentation does not offer any sulution, in fact it
   leads me to the conclusion that emacs is 7-bit sick.  PLEASE someone tell
   me that this is not so, and flame me about overlooking the obvoius solution,
   or I will seriously consider converting to (shudder) vi.

Emacs handles editing of files with high-bit-set, NUL, and control
characters with ease.  However, Emacs does assume that its input and
output symbols are the plain ASCII character set and nothing else.  I
understand that there is a Japanese version of GNU Emacs that corrects
this weakness for the display of Japanese writing.  Maybe something
similar has been done for a European character set that could be adapted
to your situation.

Good luck!

--
Joe Wells <jbw@bucsf.bu.edu>
jbw%bucsf.bu.edu@bu-it.bu.edu
...!harvard!bu-cs!bucsf!jbw

prc@erbe.se (Robert Claeson) (09/12/89)

In article <37888@bu-cs.BU.EDU> jbw@bucsf.bu.edu (Joe Wells) writes:

>Emacs handles editing of files with high-bit-set, NUL, and control
>characters with ease.  However, Emacs does assume that its input and
>output symbols are the plain ASCII character set and nothing else.  I
>understand that there is a Japanese version of GNU Emacs that corrects
>this weakness for the display of Japanese writing.  Maybe something
>similar has been done for a European character set that could be adapted
>to your situation.

I think that I've seen somewhere, that version 19 of Emacs will handle
true 8-bit characters (a la ISO 8859) with ease, without the need to
prefix them in some funny way just to enter an ordinary character. If
not, I might consider downgrading to the latest release of Emacs from
Uniplex, which does these things.
-- 
          Robert Claeson      E-mail: rclaeson@erbe.se
	  ERBE DATA AB