all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Dyballa <Peter_Dyballa@Web.DE>
To: Wojtek <wnkltd@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Polish characters in emacs
Date: Fri, 19 Oct 2007 21:38:05 +0200	[thread overview]
Message-ID: <24A01837-9484-4D7E-8C74-D2E5A9953B87@Web.DE> (raw)
In-Reply-To: <1192811779.337702.87440@v29g2000prd.googlegroups.com>


Am 19.10.2007 um 18:36 schrieb Wojtek:

> I should add that I am running emacs 21.4 on Fedora 5 and emacs 22.1
> on Fedora 7.

This explains why C-u C-x = returns different "numbers." They really  
don't mean a thing for us users. They are some kind of representation  
of the way GNU Emacs stores these characters in the buffer you're  
visiting. Of importance is the last value, U+<four hex digits>. This  
corresponds to the position of the character in Unicode. So it's not  
true that different "key codes" are transmitted. See below!

Have you found the lines in which the font is named from which the  
glyph is taken to display the character?


>   The reason that the behaviour puzzles me is that I
> understand that both of the emacses are getting their fonts from the
> same place and hence it is (based on my understanding) a matter of
> emacs displaying the font.

Right. IMO much progress happened between 21.4 and 22.1, GNU Emacs  
learned some encodings, what-cursor-position gives much more and  
valuable information. You can press the mode-line in many places and  
you get information instead of errors. Many tool-tips appear ...

> When I ask emacs to describe-coding-system I get that it is utf-8 for
> terminal output in both emacses.

OK, but then your tests are incorrect. To test what is input to GNU  
Emacs just type in *scratch* buffer or such:

	C-q <some key press event on the keyboard>

(This is quite nice when you press a function or cursor key!) This  
*input* problem is one area, which probably works without fault.

You won't believe this because you don't *see* it. So your problem is  
merely an *output* problem. When you write that the mode-line starts  
with ``--:´´ then you could have already found that this stands for  
an undecided encoding (by pressing the second - in mode-line). Or:  
what you see is not what you've got. So make precise tests. For  
example with the test file I sent to the list. Its first line *will*  
set the buffer's encoding to the proper value to see the characters  
as described. Then it's up to you and your system to find the  
adequate fonts or fontsets. For this latter purpose you might write  
an ELisp file that lets you choose another font (or fontset) from  
those (monospaced) fonts (S-mouse-1) (you can, of course, leave out  
completely uninteresting font encodings):

(if (fboundp 'new-fontset)
   (progn
     (create-fontset-from-fontset-spec "-b&h-lucidatypewriter-medium- 
r-*-*-10-*-*-*-*-*-fontset-10pt_lucidatypewriter" t 'noerror)
       (set-fontset-font "fontset-10pt_lucidatypewriter"	      'latin- 
iso8859-1  '("lucidatypewriter" . "iso8859-1"))
       (set-fontset-font "fontset-10pt_lucidatypewriter"	      'latin- 
iso8859-2  '("lucidatypewriter" . "iso8859-2"))
       (set-fontset-font "fontset-10pt_lucidatypewriter"	      'latin- 
iso8859-3  '("lucidatypewriter" . "iso8859-3"))
       (set-fontset-font "fontset-10pt_lucidatypewriter"	      'latin- 
iso8859-4  '("lucidatypewriter" . "iso8859-4"))
       (set-fontset-font "fontset-10pt_lucidatypewriter"	   'cyrillic- 
iso8859-5  '("lucidatypewriter" . "iso8859-5"))
       (set-fontset-font "fontset-10pt_lucidatypewriter"	     'arabic- 
iso8859-6  '("lucidatypewriter" . "iso8859-6"))
       (set-fontset-font "fontset-10pt_lucidatypewriter"	      'greek- 
iso8859-7  '("lucidatypewriter" . "iso8859-7"))
       (set-fontset-font "fontset-10pt_lucidatypewriter"	     'hebrew- 
iso8859-8  '("lucidatypewriter" . "iso8859-8"))
       (set-fontset-font "fontset-10pt_lucidatypewriter"	      'latin- 
iso8859-9  '("lucidatypewriter" . "iso8859-9"))
       (set-fontset-font "fontset-10pt_lucidatypewriter"	      'latin- 
iso8859-10 '("lucidatypewriter" . "iso8859-10"))
       (set-fontset-font "fontset-10pt_lucidatypewriter"	      'latin- 
iso8859-13 '("lucidatypewriter" . "iso8859-13"))
       (set-fontset-font "fontset-10pt_lucidatypewriter"	      'latin- 
iso8859-15 '("lucidatypewriter" . "iso8859-15"))
       (set-fontset-font "fontset-10pt_lucidatypewriter" 'mule- 
unicode-0100-24ff '("lucidatypewriter" . "iso10646-1"))
       (set-fontset-font "fontset-10pt_lucidatypewriter" 'mule- 
unicode-2500-33ff '("lucidatypewriter" . "iso10646-1"))
       (set-fontset-font "fontset-10pt_lucidatypewriter" 'mule- 
unicode-e000-ffff '("lucidatypewriter" . "iso10646-1"))
       (set-fontset-font  
"fontset-10pt_lucidatypewriter"                  'ascii  
'("lucidatypewriter" . "iso10646-1"))
       (set-fontset-font "fontset-10pt_lucidatypewriter"              
'iso10646-1 '("lucidatypewriter" . "iso10646-1"))
))
(provide 'site-fontsets-x11)

or (again, you can leave out variants and sizes and concentrate on  
those encodings that have ÓóĄąĆćĘꣳŃńŚśŹźŻż):

(setq x-fixed-font-alist
    '("X11 Font Menu"
       ("Test fixed"
       ("Courier @ 75 DPI"
;; For these, we specify the point height and the DPIs.
        ( "8" 	      	"-adobe-courier-medium-r-normal--*-80-75-75-m-*- 
iso10646-1"   "8")
        ("10" 	      	"-adobe-courier-medium-r-normal--*-100-75-75-m- 
*-iso10646-1" "10")
        ("12" 	      	"-adobe-courier-medium-r-normal--*-120-75-75-m- 
*-iso10646-1" "12")
        ( "8 bold"       "-adobe-courier-bold-r-normal--*-80-75-75-m- 
*-iso10646-1"   "8 bold")
        ("10 bold"       "-adobe-courier-bold-r-normal--*-100-75-75-m- 
*-iso10646-1" "10 bold")
        ("12 bold"       "-adobe-courier-bold-r-normal--*-120-75-75-m- 
*-iso10646-1" "12 bold")
        ( "8 slant"      "-adobe-courier-medium-o-normal--*-80-75-75- 
m-*-iso10646-1"   "8 slant")
        ("10 slant"      "-adobe-courier-medium-o-normal--*-100-75-75- 
m-*-iso10646-1" "10 slant")
        ("12 slant"      "-adobe-courier-medium-o-normal--*-120-75-75- 
m-*-iso10646-1" "12 slant")
        ( "8 bold slant" "-adobe-courier-bold-o-normal--*-80-75-75-m- 
*-iso10646-1"   "8 bold slant")
        ("10 bold slant" "-adobe-courier-bold-o-normal--*-100-75-75-m- 
*-iso10646-1" "10 bold slant")
        ("12 bold slant" "-adobe-courier-bold-o-normal--*-120-75-75-m- 
*-iso10646-1" "12 bold slant")
       )
       ("ISO 8859-15 medium"
        ("B&H LucidaSans Typewriter med" "-*-lucida sans typewriter- 
medium-r-*--0-0-0-0-m-0-iso8859-15")
        ("B&H Luxi Mono med"             "-*-luxi mono-medium-r- 
*--0-0-0-0-m-0-iso8859-15")
        ("Bitstream Vera Sans Mono med"  "-*-bitstream vera sans mono- 
medium-r-*--0-0-0-0-m-0-iso8859-15")
        ("ProFont med"                   "-misc-profontwindows-medium- 
r-*--0-0-0-0-m-0-iso8859-15")
        ("Monotype Andale Mono med" 	"-monotype-andale mono-medium-r- 
*--0-0-0-0-m-0-iso8859-15")
        ("Monotype Courier New med" 	"-monotype-courier new-medium-r- 
*--0-0-0-0-m-0-iso8859-15")
        ("urw++ Courier med"         	"-urw-courier-medium-r- 
*--0-0-0-0-m-0-iso8859-15")
        ("urw++ Nimbus Mono l med"   	"-urw-nimbus mono l-medium-r- 
*--0-0-0-0-m-0-iso8859-15")
        )
))
(provide 'site-fonts-x11)

In an init file you can load these extra font definitions via:

	(require 'site-fontsets-x11)

or

	(require 'site-fonts-x11)

and use them for the tests: in one window my test file is open and  
you switch through all the fonts to see whether at some time you see  
the Polish characters. Of course you can sort the 18 or 20 lines to  
become one Polish character block.

Once you've accomplished to see the the right shapes from the test  
file, you can start to enter yourself Polish characters into this  
test file (and kill the buffer without saving your changes).  
Remember: only in the right encoding you can see the right characters  
because one byte value represents dozens of different characters in  
dozens of different encodings.


BTW, what diacritic did you enter on Fedora 5? I can't see anything.

--
Greetings
   Pete

One-Shot Case Study, n.:
         The scientific equivalent of the four-leaf clover, from
         which it is concluded all clovers possess four leaves
         and are sometimes green.

      reply	other threads:[~2007-10-19 19:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-11 21:09 Polish characters in emacs Wojtek
2007-10-12  9:03 ` Eli Zaretskii
2007-10-12 10:20 ` Peter Dyballa
     [not found] ` <mailman.1976.1192184434.18990.help-gnu-emacs@gnu.org>
2007-10-12 19:03   ` Wojtek
2007-10-12 20:44     ` Peter Dyballa
     [not found]     ` <mailman.1993.1192221868.18990.help-gnu-emacs@gnu.org>
2007-10-19 16:36       ` Wojtek
2007-10-19 19:38         ` Peter Dyballa [this message]

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=24A01837-9484-4D7E-8C74-D2E5A9953B87@Web.DE \
    --to=peter_dyballa@web.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=wnkltd@gmail.com \
    /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.