Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!brutus.cs.uiuc.edu!lll-winken!uunet!bu-cs!jbw From: jbw@bucsf.bu.edu (Joe Wells) Newsgroups: gnu.emacs Subject: Re: 8 bit characters Message-ID: <37888@bu-cs.BU.EDU> Date: 11 Sep 89 01:16:16 GMT References: <1989Sep10.172226.5865@sssab.se> Sender: daemon@bu-cs.BU.EDU Organization: Boston University Computer Science Department Lines: 46 In-reply-to: pausv@sssab.se's message of 10 Sep 89 17:22:26 GMT 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 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@bu-it.bu.edu ...!harvard!bu-cs!bucsf!jbw