[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Usage of standard-display-table in MSDOS

From: Ehud Karni
Subject: Re: Usage of standard-display-table in MSDOS
Date: Wed, 25 Aug 2010 16:04:56 +0300

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 <a file with Hebrew (#xE0-#xFA) characters>)
    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 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 <http://www.keyserver.net/>    Better Safe Than Sorry

reply via email to

[Prev in Thread] Current Thread [Next in Thread]