From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Usage of standard-display-table in MSDOS Date: Fri, 27 Aug 2010 19:30:46 +0300 Message-ID: <831v9km30p.fsf@gnu.org> References: <8739u47evm.fsf@uwakimon.sk.tsukuba.ac.jp> <201008241113.o7OBDkUX011519@beta.mvs.co.il> <83aaocnec1.fsf@gnu.org> <201008251304.o7PD4uJu028868@beta.mvs.co.il> <83vd6ymumt.fsf@gnu.org> <201008261526.o7QFQD7e030387@beta.mvs.co.il> <83k4ndmiij.fsf@gnu.org> <201008271335.o7RDZehv024936@beta.mvs.co.il> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1282927546 21817 80.91.229.12 (27 Aug 2010 16:45:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 27 Aug 2010 16:45:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: ehud@unix.mvs.co.il Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 27 18:45:45 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 1Op23j-0002n8-1C for ged-emacs-devel@m.gmane.org; Fri, 27 Aug 2010 18:45:44 +0200 Original-Received: from localhost ([127.0.0.1]:33827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Op23g-0006w6-OK for ged-emacs-devel@m.gmane.org; Fri, 27 Aug 2010 12:45:40 -0400 Original-Received: from [140.186.70.92] (port=59165 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Op1qD-0002SR-GR for emacs-devel@gnu.org; Fri, 27 Aug 2010 12:31:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Op1os-0000JE-5j for emacs-devel@gnu.org; Fri, 27 Aug 2010 12:31:41 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:60838) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Op1or-0000J1-U0 for emacs-devel@gnu.org; Fri, 27 Aug 2010 12:30:22 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0L7T00F00KCTK800@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Fri, 27 Aug 2010 19:30:13 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.186.164]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L7T00FWYKIBJE10@a-mtaout21.012.net.il>; Fri, 27 Aug 2010 19:30:13 +0300 (IDT) In-reply-to: <201008271335.o7RDZehv024936@beta.mvs.co.il> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) 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:129314 Archived-At: > Date: Fri, 27 Aug 2010 16:35:40 +0300 > From: "Ehud Karni" > Cc: emacs-devel@gnu.org > > You missing the point that most of my files are not "word-processor" > (or HTML/XML) files but are data file that are either read as ISO-8859-8 > or no-conversion (binary) encoding. > > Now, some of them has DOS Hebrew (#x80-9A) and graphic characters in > them, in ADDITION to UNIX Hebrew (#xE0-FA). I still want to see it as > Hebrew characters (so I can read it) but with a distinction between the > 2 Hebrew types, I want to know the 8-bit encoding, it matters. So you basically have files that mix different encodings of Hebrew characters, is that right? If so, I would suggest indeed to set up the display table, but not as you did it in older Emacsen. What you need is to map those 8-bit bytes to the Unicode codepoints of the corresponding Hebrew characters. That is, let the slot of eight-bit character #xA0, which is represented in Emacs as #x3FFFA0, be set in the display table to #x5d0 (the Unicode codepoint of Aleph). Then you will see Aleph when the file has #xA0, provided that you read the file with no-conversion. > So I have to use a display table, and I want it to work for both text > terminals and X (or other windowed system - Mac, MS - which I myself > don't use). If you set up the display table as I describe above, both X and text terminals will work. For text terminals, you will need to set terminal-coding-system to some Hebrew capable encoding that these terminals support. For GUI displays, you need a font to be installed that is capable of displaying Hebrew characters. > > These graphic characters are part of Unicode as well (in the U+25XX > > block), and Emacs 23 knows how to encode them in cp862, or any other > > codepage that supports these characters. Try "C-x 8 RET 2525 RET" and > > see for yourself, it has a valid cp862 encoding. > > What I want is just a subset of this in my display table, so bytes in > the range #xB0-#xDF will be shown as is on text terminal and as the > CP862 glyphs on X (I am willing to have different display tables for > each case, I don't use text terminal and X on the same Emacs instance). There should be no problem in using the same display table set up as above on all types of terminals. > I know how to do it when the locale environment is set to "en_GB". > Can you instruct me how to do this when the locale environment is set > to "he_IL" ? The locale environment shouldn't have any effect on that. All it does is set defaults for certain coding-systems. You will want to override those defaults anyway, e.g. for using no-conversion when visiting these files. I don't see anything else that might interfere, do you? > Just as curiosity, some times I get files where the Hebrew is encoded > as the lower Latin letters and Aleph is represented by @ (this is > known as old-code and it is still used by some companies, even though > in is some other applications already use UTF-8 XML files). > > Do you have a way to display it as Hebrew without a display table ? You could write your own coding-system, but I think display tables are easier.