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: Tue, 24 Aug 2010 14:13:46 +0300 Organization: Mivtach-Simon Insurance agencies Message-ID: <201008241113.o7OBDkUX011519@beta.mvs.co.il> References: <8739u47evm.fsf@uwakimon.sk.tsukuba.ac.jp> 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 1282652682 22300 80.91.229.12 (24 Aug 2010 12:24:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 24 Aug 2010 12:24:42 +0000 (UTC) Cc: eliz@gnu.org, emacs-devel@gnu.org, handa@m17n.org To: stephen@xemacs.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 24 14:24:40 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 1OnsYQ-0006bW-QJ for ged-emacs-devel@m.gmane.org; Tue, 24 Aug 2010 14:24:39 +0200 Original-Received: from localhost ([127.0.0.1]:51786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnsYP-0006OU-Ut for ged-emacs-devel@m.gmane.org; Tue, 24 Aug 2010 08:24:37 -0400 Original-Received: from [140.186.70.92] (port=40473 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnsYE-0006Ly-TN for emacs-devel@gnu.org; Tue, 24 Aug 2010 08:24:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OnsYD-0000C1-Md for emacs-devel@gnu.org; Tue, 24 Aug 2010 08:24:26 -0400 Original-Received: from [193.16.147.12] (port=58788 helo=unix.mvs.co.il) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnsYA-0000BC-K5; Tue, 24 Aug 2010 08:24:24 -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 o7OBDqM6025419; Tue, 24 Aug 2010 14:13:53 +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 o7OBDq3b011522; Tue, 24 Aug 2010 14:13:52 +0300 Original-Received: (from root@localhost) by beta.mvs.co.il (8.14.1/8.14.1/Submit) id o7OBDkUX011519; Tue, 24 Aug 2010 14:13:46 +0300 In-reply-to: <8739u47evm.fsf@uwakimon.sk.tsukuba.ac.jp> (message from Stephen J. Turnbull on Tue, 24 Aug 2010 14:34:37 +0900) 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:129127 Archived-At: On Tue, 24 Aug 2010 14:34:37 Stephen J. Turnbull wrote: > > > > ;; In multibyte mode, we want unibyte buffers to be displayed > > ;; using the terminal coding system, so that they display > > ;; correctly on the DOS terminal; in unibyte mode we want to see > > ;; all 8-bit characters verbatim. In both cases, we want the > > ;; entire range of 8-bit characters to arrive at our display code > > ;; verbatim. > > (standard-display-8bit 127 255) > > > > Is it really working in non-iso-8859-1 environment as > > expected? Note that 128..255 are latin-1 characters after > > Emacs 23, not raw-bytes. So, I think the above call will > > make 8-bit bytes in unibyte buffer displayed as latin-1 > > characters, but as the termial encoding system doesn't > > support latin-1 chars in, for instance, greek environment, > > just '?' will be displayed. > > Hebrew and Cyrillic are other obvious candidates for testing here. > They seem to have more active participants on emacs-devel. >From my checks this does not work on text terminals (it really depends on the LANG env variable). I had this code in Emacs 21.3: (defun set-standard-display-table () (setq standard-display-table (make-display-table)) (standard-display-8bit 127 254)) I then set the DOS Hebrew chars (128-144) each to a vector: [ 169 ] Then visit a file (literally). In Emacs 21.3 it works fine with any value of LANG, show the Hebrew chars as they should, and Hebrew DOS (CP862) chars with a prefix. In Emacs 23.1 it works only if the LANG is set to a Latin-1 value (eg en_GB). 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). 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". The use of UTF-8 (which works well on X) is not an option. Many of the users has text terminals, and most of the data file viewed are in iso-8859-8 or even Hebrew DOS (CP862). I recently install some Emacs stuff in an Israeli insurance company and because of this problem I used 21.3 instead of newer version. 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