all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Subject: Re: MULE shows gibberish; now what?
Date: Fri, 27 Sep 2002 22:43:47 +0200	[thread overview]
Message-ID: <vafelbfw4cc.fsf@lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: an2dcr$1phl$1@agate.berkeley.edu

Ilya Zakharevich <nospam-abuse@ilyaz.org> writes:

> [A complimentary Cc of this posting was sent to
> Kai
>  =?iso-8859-15?q?Gro=DFjohann?=
> <Kai.Grossjohann@CS.Uni-Dortmund.DE>], who wrote in article <vaffzvvzm51.fsf@lucy.cs.uni-dortmund.de>:
>> >> |   character: ¤ (07444, 3876, 0xf24)
>> >> |     charset: latin-iso8859-15
>> >> |              (Right-Hand Part of Latin Alphabet 9 (ISO/IEC 8859-15): ISO-IR-203.)
>> >> |  code point: 36
>> >> |      syntax: w 	which means: word
>> >> |    category: l:Latin  
>> >> | buffer code: 0x8E 0xA4
>> >> |   file code: 0x8E 0xA4 (encoded by coding system emacs-mule)
>> >> |     Unicode: 20AC
>> >> |        font: -Misc-Fixed-Medium-R-Normal--14-130-75-75-C-70-ISO8859-15
>> >
>> > So it does not show which codepoint inside the font is chosen!
>> 
>> You see "code point: 36", and you see that it is the right-hand part
>> of the alphabet only.  So 128+36=164 is the actual code point you want.
>
> *I* do not want any *codepoint*.  What I want is that CYRILLIC CAPITAL R
> is shown with a glyph which looks like `P', not like `A'.

You said it doesn't show which codepoint is used, I showed you that
you can compute the codepoint from what it shows.  That's all.

I'm sorry if there was a misunderstanding.  I understood your "So it
does not show which codepoint ... is chosen!" as a question.  And I
said "...you want" instead of "...you wanted to know".

> So you say that the "code point" entry of report is related to the
> codepoint of the font chosen to show the glyph?  How is it
> recalculated basing on the encoding of the font?

In the charset line it tells you it's the right hand part of
Latin-9.  That's where the offset of 128 comes from.

>> You can look at the font name, for example.  And you can look at the
>> charset and compare that with your font, to see whether they match.
>
> How would I know?  Emacs case the info about the font, not me.  One
> cannot deduce the encoding from the name, but one can do it from the
> character properties table.

One cannot deduce the encoding from the name?  I thought the encoding
was in the very end of the long-font-name-with-lotsa-dashes.  But I'm
not an expert on X fonts, I just kinda guessed it from having seen
lots of fonts with -gb2312 or -iso8859-1 or -iso10646 at the end.

>> >> You can tell Emacs to use the foo font for the bar encoding.
>> >
>> > How?  And how do I tell Emacs in which encoding this font actually is?
>> 
>> You can't.
>
> Wow!  So MULE is absolutely useless indeed...  I knew that it makes it
> extremely hard to edit 8-bit text, but I was told that this is the
> price to pay for internationalization.  Now it turns out that it also
> cannot *show* foreign text...

It was just my meagre attempt at some humor to lighten up the
discussion.

In my understanding, telling Emacs "use the foo font to display
gb2312 encoded characters" amounts to pretty much the same thing as
telling Emacs "the foo font is in gb2312 encoding".

>> >> Maybe
>> >> you have (accidentally) told Emacs to use a KOI-R font for the
>> >> iso-8859-5 encoding, or something like this.
>> >
>> > With -no-init-file?  I doubt it.  ;-)
>> 
>> With a X11 resource, for instance.  You probably set the font for
>> your X11 apps somewhere (otherwise it would be "fixed").
>
> *menuFont:      -*-courier-medium-r-*-*-18-*-*-*-*-*-*-*
> Emacs*Font:     -misc-fixed-bold-*-*-*-*-140-75-75-*-*-*-1
> Emacs*paneFont: -*-courier-bold-r-*-*-18-180-*-*-*-*-*-*
> Emacs*selectionFont:    -*-courier-bold-r-*-*-16-180-*-*-*-*-*-*
> Emacs.shell.menu.popup.font:    -*-courier-bold-r-*-*-18-180-*-*-*-*-*-*
> Emacs.shell.pane.menubar.font:  -*-courier-bold-r-*-*-16-180-*-*-*-*-*-*

Okay, okay.  Hm.

But first things first.  Now you know which font Emacs used to display
the Cyrillic.  Do you have any way of finding out the encoding
of that font (with an X11 font editor, perhaps, or by running some
other program)?

From the output of C-u C-x = you also know that Emacs thought the
font was in iso-8859-5 encoding (because Emacs used that font for
that charset).

I would like to verify at this point that the Cyrillic font is indeed
in an encoding that is NOT iso-8859-5.  Could you please do that?

Now let's assume that the font is really in the "wrong" encoding (ie,
not in iso-8859-5).  Now you need to tell Emacs to use a different
font for iso-8859-5.  This works with fontsets.

I am ashamed to say that I've tried to read the documentation on
fontsets and haven't been able to understand it.  But Emacs works
well for me, even without fontsets, so I didn't spend more than 2 or
3 minutes on understanding it.

I'm sure that you can cook up a fontset specification that will tell
Emacs to use a font that's right for iso-8859-5.

kai

PS: I'm assuming that Emacs uses a very simple mapping from
    characters to glyphs in the font.  For displaying the character
    numbered 4711 in any given encoding, Emacs uses the glyph at that
    code point.

    Please correct me if I'm wrong.  Anyone?
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

  parent reply	other threads:[~2002-09-27 20:43 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-24  5:30 MULE shows gibberish; now what? Ilya Zakharevich
2002-09-24  8:42 ` Kai Großjohann
2002-09-24 15:59   ` Peter J. Acklam
2002-09-24 20:05     ` Kai Großjohann
2002-09-28 11:09       ` Peter J. Acklam
2002-09-28 12:22         ` Kai Großjohann
     [not found]           ` <k7l61bjc.fsf@online.no>
2002-09-28 15:58             ` Kai Großjohann
2002-09-28 16:32               ` Peter J. Acklam
2002-09-28 17:12                 ` Kai Großjohann
2002-09-29  9:27                   ` Peter J. Acklam
2002-09-29 15:45                     ` Kai Großjohann
2002-09-29 16:27                       ` Peter J. Acklam
2002-09-29 20:27                         ` Kai Großjohann
2002-10-01  7:59                           ` Peter J. Acklam
2002-09-29 20:13                     ` Stefan Monnier <foo@acm.com>
2002-09-30  1:22                       ` Miles Bader
     [not found]                       ` <mailman.1033349070.28368.help-gnu-emacs@gnu.org>
2002-09-30 14:03                         ` Stefan Monnier <foo@acm.com>
2002-09-29 20:27                     ` Kai Großjohann
2002-09-29  0:03               ` Clemens Fischer
2002-09-29 15:44                 ` Kai Großjohann
     [not found]   ` <amr0cn$2lvo$1@agate.berkeley.edu>
2002-09-25 14:11     ` Kai Großjohann
     [not found]       ` <amu08m$i97$1@agate.berkeley.edu>
2002-09-26  8:23         ` Kai Großjohann
     [not found]           ` <amvppk$10v4$1@agate.berkeley.edu>
2002-09-26 23:09             ` Oliver Scholz
2002-09-27 11:51             ` Kai Großjohann
     [not found]               ` <an2dcr$1phl$1@agate.berkeley.edu>
2002-09-27 20:43                 ` Kai Großjohann [this message]
     [not found]                   ` <an3ksh$27f2$1@agate.berkeley.edu>
2002-09-28 12:20                     ` Kai Großjohann
     [not found]                       ` <an7n4r$8dh$1@agate.berkeley.edu>
2002-09-30 20:49                         ` Jason Rumney
2002-09-30 21:22                           ` Ilya Zakharevich
2002-10-01 22:10                             ` Jason Rumney
2002-10-02  1:30                               ` Ilya Zakharevich
2002-10-02 13:10                                 ` Stefan Monnier <foo@acm.com>
2002-10-02 19:50                                 ` Jason Rumney
2002-09-29 12:28                     ` Jason Rumney
     [not found]           ` <an0bd9$1832$1@agate.berkeley.edu>
2002-09-27 11:54             ` Kai Großjohann
     [not found]               ` <an2dig$1pi4$1@agate.berkeley.edu>
2002-09-27 20:37                 ` Stefan Monnier <foo@acm.com>
2002-09-28  7:15                   ` Ilya Zakharevich
2002-10-02 23:48                   ` Ilya Zakharevich
2002-10-03 16:12                     ` Stefan Monnier <foo@acm.com>
2002-10-05 10:00                       ` Ilya Zakharevich
2002-10-05 16:07                         ` Stefan Monnier <foo@acm.com>
2002-10-06  0:43                           ` Ilya Zakharevich
2002-10-07 20:19                             ` Stefan Monnier <foo@acm.com>
2002-10-08  0:39                               ` Ilya Zakharevich
2002-10-08 13:33                                 ` Stefan Monnier <foo@acm.com>
2002-10-08 18:52                                   ` Ilya Zakharevich
2002-10-08 19:02                       ` MULE shows gibberish; RAWIN-R vs iso8859-5 Ilya Zakharevich
2002-09-27 20:44                 ` MULE shows gibberish; now what? Kai Großjohann
2002-09-27 22:30                 ` Oliver Scholz
2002-09-27 22:42                   ` Oliver Scholz
2002-09-27  7:29 ` Luis O. Silva
2002-09-27  7:28   ` Ilya Zakharevich
2002-10-09  6:14 ` Ilya Zakharevich
2002-10-09 18:20   ` Stefan Monnier <foo@acm.com>
2002-10-09 20:03     ` Ilya Zakharevich
2002-10-09 21:39       ` Stefan Monnier
2002-10-10  0:55         ` Ilya Zakharevich
2002-10-10  0:29     ` Kenichi Handa
2002-10-10  0:55       ` Stefan Monnier
2002-10-10  1:51         ` Kenichi Handa
2002-10-10  0:58       ` Ilya Zakharevich
2002-10-10  1:30         ` Kenichi Handa
2002-10-10  1:08       ` Ilya Zakharevich
2002-10-10  2:02         ` Kenichi Handa
2002-10-10  6:44           ` Ilya Zakharevich
2002-10-31  0:48   ` Ilya Zakharevich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vafelbfw4cc.fsf@lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.