From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ehud Karni" Newsgroups: gmane.emacs.devel Subject: Re: Usage of standard-display-table in MSDOS Date: Wed, 25 Aug 2010 16:04:56 +0300 Organization: Mivtach-Simon Insurance agencies Message-ID: <201008251304.o7PD4uJu028868@beta.mvs.co.il> References: <8739u47evm.fsf@uwakimon.sk.tsukuba.ac.jp> <201008241113.o7OBDkUX011519@beta.mvs.co.il> <83aaocnec1.fsf@gnu.org> Reply-To: ehud@unix.mvs.co.il NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1282741516 28688 80.91.229.12 (25 Aug 2010 13:05:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 Aug 2010 13:05:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: eliz@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 25 15:05:15 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OoFfC-0005ni-PI for ged-emacs-devel@m.gmane.org; Wed, 25 Aug 2010 15:05:11 +0200 Original-Received: from localhost ([127.0.0.1]:47387 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OoFfC-0007Wn-BT for ged-emacs-devel@m.gmane.org; Wed, 25 Aug 2010 09:05:10 -0400 Original-Received: from [140.186.70.92] (port=46744 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OoFf6-0007Wi-BF for emacs-devel@gnu.org; Wed, 25 Aug 2010 09:05:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OoFf4-0002Qv-H1 for emacs-devel@gnu.org; Wed, 25 Aug 2010 09:05:04 -0400 Original-Received: from [193.16.147.12] (port=39133 helo=unix.mvs.co.il) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OoFf4-0002Q0-12; Wed, 25 Aug 2010 09:05:02 -0400 Original-Received: from beta.mvs.co.il (beta [10.253.0.3]) by unix.mvs.co.il (8.13.8/8.13.7) with ESMTP id o7PD4vIt026801; Wed, 25 Aug 2010 16:04:57 +0300 Original-Received: from beta.mvs.co.il (localhost [127.0.0.1]) by beta.mvs.co.il (8.14.1/8.14.1) with ESMTP id o7PD4uRI028871; Wed, 25 Aug 2010 16:04:56 +0300 Original-Received: (from root@localhost) by beta.mvs.co.il (8.14.1/8.14.1/Submit) id o7PD4uJu028868; Wed, 25 Aug 2010 16:04:56 +0300 In-reply-to: <83aaocnec1.fsf@gnu.org> (message from Eli Zaretskii on Tue, 24 Aug 2010 19:51:58 +0300) X-Mailer: Emacs 21.3.1 rmail (send-msg 1.109) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:129202 Archived-At: On Tue, 24 Aug 2010 19:51:58 Eli Zaretskii wrote: > > > > I want to see Hebrew (iso-8559-8) characters even when LANG=C, because > > setting the LANG to he_IL changes to much other things (for example, > > it change the `ls' output, which breaks dired). > > You could do > > M-x set-locale-environment RET he_IL RET > > from inside Emacs, which I think will do what you want without > affecting `ls' etc. (unless you mean `ls' that is run from the Emacs > shell buffer). That fix my problem. It does not change any env variable so it is good even for shell spawned from Emacs. > > The problem as I see it is that the characters it the vectors in the > > display table are going further translation and not used "literally". > > I don't understand what you are trying to say here. Please elaborate > about "further translation" and "not used literally". The best way to understand it is with an example: For the DOS Hebrew Aleph The standard-display-table is set like this: (aset standard-display-table 128 '[ 169 244 ] ) In Emacs 21.3 these exact characters were displayed (sent) to the text terminal and appeared as prefix char + Aleph. In 23.1 I see the prefix + ? (question mark). The character `244' (Aleph) is been encoded in the current locale and this inhibits its display as Aleph. You can easily check it by the following prescription: (setq standard-display-table (make-display-table)) (standard-display-8bit 128 254) (set-locale-environment "en_GB") (find-file-literally ) check how it is displayed - you see the Hebrew as it should. Now change the locale. (set-locale-environment "he_IL") You see ? because the #xE0-#xFA is encoded in Hebrew locale and are meaningless (instead of just being plain 8 bit). The standard-display-table has not changed, but the meaning of the 8 bit numbers in the characters vectors has changed. To solve my Hebrew display I have 2 possibilities: 1. Set the locale to some Latin-1 language (e.g. en_GB) and continue to work like I do in 21.3. It is simpler but I it is some kind of deceiving myself, and it will work only with 8 bit Hebrew fonts. 2. Set the locale to Hebrew and change the display table (entries #x80- #x9A - DOS Hebrew, and #xE0-#xFA - ISO-8859-8 Hebrew to UTF Hebrew) but then I have to set all the DOS graphic characters myself. I'll go the 2nd way, but I'll appreciate something that will ease it, i.e. a way to set the standard-display-table for all the non Hebrew characters < 256 to something that will make it work like CP862. Ehud. -- Ehud Karni Tel: +972-3-7966-561 /"\ Mivtach - Simon Fax: +972-3-7976-561 \ / ASCII Ribbon Campaign Insurance agencies (USA) voice mail and X Against HTML Mail http://www.mvs.co.il FAX: 1-815-5509341 / \ GnuPG: 98EA398D Better Safe Than Sorry