From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: Polish characters in emacs Date: Fri, 19 Oct 2007 21:38:05 +0200 Message-ID: <24A01837-9484-4D7E-8C74-D2E5A9953B87@Web.DE> References: <1192136997.140783.256650@d55g2000hsg.googlegroups.com> <1192208554.554284.308310@t8g2000prg.googlegroups.com> <1192811779.337702.87440@v29g2000prd.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1192822719 466 80.91.229.12 (19 Oct 2007 19:38:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Oct 2007 19:38:39 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Wojtek Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 19 21:38:39 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Iixg4-0000q7-Bi for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Oct 2007 21:38:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iixfw-0000Yi-Ml for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Oct 2007 15:38:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iixff-0000Xw-JT for help-gnu-emacs@gnu.org; Fri, 19 Oct 2007 15:38:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iixfe-0000WP-NJ for help-gnu-emacs@gnu.org; Fri, 19 Oct 2007 15:38:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iixfe-0000WE-Hu for help-gnu-emacs@gnu.org; Fri, 19 Oct 2007 15:38:10 -0400 Original-Received: from fmmailgate02.web.de ([217.72.192.227]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iixfd-0006uo-Bb for help-gnu-emacs@gnu.org; Fri, 19 Oct 2007 15:38:10 -0400 Original-Received: from smtp05.web.de (fmsmtp05.dlan.cinetic.de [172.20.4.166]) by fmmailgate02.web.de (Postfix) with ESMTP id 789EBA6669B6; Fri, 19 Oct 2007 21:38:08 +0200 (CEST) Original-Received: from [195.4.208.205] (helo=[192.168.1.2]) by smtp05.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.108 #197) id 1Iixfb-0003aV-00; Fri, 19 Oct 2007 21:38:08 +0200 In-Reply-To: <1192811779.337702.87440@v29g2000prd.googlegroups.com> X-Mailer: Apple Mail (2.752.2) X-Sender: Peter_Dyballa@web.de X-Provags-ID: V01U2FsdGVkX19ftJ1xa5ekY6SVnrnN9dqrzSWLunpzRfxM5OoV G9BXQHK1UvSmXg8ZNoW9Hg66Aa/HsZJtiXBt0nXtFY0hgPO5/1 hGb5cZrhDkI4xZ/HShng== X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:48597 Archived-At: 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 =3D returns different "numbers." They really =20= don't mean a thing for us users. They are some kind of representation =20= of the way GNU Emacs stores these characters in the buffer you're =20 visiting. Of importance is the last value, U+. This =20 corresponds to the position of the character in Unicode. So it's not =20 true that different "key codes" are transmitted. See below! Have you found the lines in which the font is named from which the =20 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 =20 learned some encodings, what-cursor-position gives much more and =20 valuable information. You can press the mode-line in many places and =20 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 =20 Emacs just type in *scratch* buffer or such: C-q (This is quite nice when you press a function or cursor key!) This =20 *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 =20= merely an *output* problem. When you write that the mode-line starts =20 with ``--:=C2=B4=C2=B4 then you could have already found that this = stands for =20 an undecided encoding (by pressing the second - in mode-line). Or: =20 what you see is not what you've got. So make precise tests. For =20 example with the test file I sent to the list. Its first line *will* =20 set the buffer's encoding to the proper value to see the characters =20 as described. Then it's up to you and your system to find the =20 adequate fonts or fontsets. For this latter purpose you might write =20 an ELisp file that lets you choose another font (or fontset) from =20 those (monospaced) fonts (S-mouse-1) (you can, of course, leave out =20 completely uninteresting font encodings): (if (fboundp 'new-fontset) (progn (create-fontset-from-fontset-spec "-b&h-lucidatypewriter-medium-=20 r-*-*-10-*-*-*-*-*-fontset-10pt_lucidatypewriter" t 'noerror) (set-fontset-font "fontset-10pt_lucidatypewriter" = 'latin-=20 iso8859-1 '("lucidatypewriter" . "iso8859-1")) (set-fontset-font "fontset-10pt_lucidatypewriter" = 'latin-=20 iso8859-2 '("lucidatypewriter" . "iso8859-2")) (set-fontset-font "fontset-10pt_lucidatypewriter" = 'latin-=20 iso8859-3 '("lucidatypewriter" . "iso8859-3")) (set-fontset-font "fontset-10pt_lucidatypewriter" = 'latin-=20 iso8859-4 '("lucidatypewriter" . "iso8859-4")) (set-fontset-font "fontset-10pt_lucidatypewriter" = 'cyrillic-=20 iso8859-5 '("lucidatypewriter" . "iso8859-5")) (set-fontset-font "fontset-10pt_lucidatypewriter" = 'arabic-=20 iso8859-6 '("lucidatypewriter" . "iso8859-6")) (set-fontset-font "fontset-10pt_lucidatypewriter" = 'greek-=20 iso8859-7 '("lucidatypewriter" . "iso8859-7")) (set-fontset-font "fontset-10pt_lucidatypewriter" = 'hebrew-=20 iso8859-8 '("lucidatypewriter" . "iso8859-8")) (set-fontset-font "fontset-10pt_lucidatypewriter" = 'latin-=20 iso8859-9 '("lucidatypewriter" . "iso8859-9")) (set-fontset-font "fontset-10pt_lucidatypewriter" = 'latin-=20 iso8859-10 '("lucidatypewriter" . "iso8859-10")) (set-fontset-font "fontset-10pt_lucidatypewriter" = 'latin-=20 iso8859-13 '("lucidatypewriter" . "iso8859-13")) (set-fontset-font "fontset-10pt_lucidatypewriter" = 'latin-=20 iso8859-15 '("lucidatypewriter" . "iso8859-15")) (set-fontset-font "fontset-10pt_lucidatypewriter" 'mule-=20 unicode-0100-24ff '("lucidatypewriter" . "iso10646-1")) (set-fontset-font "fontset-10pt_lucidatypewriter" 'mule-=20 unicode-2500-33ff '("lucidatypewriter" . "iso10646-1")) (set-fontset-font "fontset-10pt_lucidatypewriter" 'mule-=20 unicode-e000-ffff '("lucidatypewriter" . "iso10646-1")) (set-fontset-font =20 "fontset-10pt_lucidatypewriter" 'ascii =20 '("lucidatypewriter" . "iso10646-1")) (set-fontset-font "fontset-10pt_lucidatypewriter" =20 'iso10646-1 '("lucidatypewriter" . "iso10646-1")) )) (provide 'site-fontsets-x11) or (again, you can leave out variants and sizes and concentrate on =20 those encodings that have =C3=93=C3=B3=C4=84=C4=85=C4=86=C4=87=C4=98=C4=99= =C5=81=C5=82=C5=83=C5=84=C5=9A=C5=9B=C5=B9=C5=BA=C5=BB=C5=BC): (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-*-=20= iso10646-1" "8") ("10" "-adobe-courier-medium-r-normal--*-100-75-75-m-=20= *-iso10646-1" "10") ("12" "-adobe-courier-medium-r-normal--*-120-75-75-m-=20= *-iso10646-1" "12") ( "8 bold" "-adobe-courier-bold-r-normal--*-80-75-75-m-=20 *-iso10646-1" "8 bold") ("10 bold" "-adobe-courier-bold-r-normal--*-100-75-75-m-=20= *-iso10646-1" "10 bold") ("12 bold" "-adobe-courier-bold-r-normal--*-120-75-75-m-=20= *-iso10646-1" "12 bold") ( "8 slant" "-adobe-courier-medium-o-normal--*-80-75-75-=20 m-*-iso10646-1" "8 slant") ("10 slant" "-adobe-courier-medium-o-normal--*-100-75-75-=20= m-*-iso10646-1" "10 slant") ("12 slant" "-adobe-courier-medium-o-normal--*-120-75-75-=20= m-*-iso10646-1" "12 slant") ( "8 bold slant" "-adobe-courier-bold-o-normal--*-80-75-75-m-=20 *-iso10646-1" "8 bold slant") ("10 bold slant" "-adobe-courier-bold-o-normal--*-100-75-75-m-=20= *-iso10646-1" "10 bold slant") ("12 bold slant" "-adobe-courier-bold-o-normal--*-120-75-75-m-=20= *-iso10646-1" "12 bold slant") ) ("ISO 8859-15 medium" ("B&H LucidaSans Typewriter med" "-*-lucida sans typewriter-=20 medium-r-*--0-0-0-0-m-0-iso8859-15") ("B&H Luxi Mono med" "-*-luxi mono-medium-r-=20 *--0-0-0-0-m-0-iso8859-15") ("Bitstream Vera Sans Mono med" "-*-bitstream vera sans mono-=20= medium-r-*--0-0-0-0-m-0-iso8859-15") ("ProFont med" "-misc-profontwindows-medium-=20= r-*--0-0-0-0-m-0-iso8859-15") ("Monotype Andale Mono med" "-monotype-andale mono-medium-r-=20= *--0-0-0-0-m-0-iso8859-15") ("Monotype Courier New med" "-monotype-courier new-medium-r-=20= *--0-0-0-0-m-0-iso8859-15") ("urw++ Courier med" "-urw-courier-medium-r-=20 *--0-0-0-0-m-0-iso8859-15") ("urw++ Nimbus Mono l med" "-urw-nimbus mono l-medium-r-=20 *--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 =20 you switch through all the fonts to see whether at some time you see =20 the Polish characters. Of course you can sort the 18 or 20 lines to =20 become one Polish character block. Once you've accomplished to see the the right shapes from the test =20 file, you can start to enter yourself Polish characters into this =20 test file (and kill the buffer without saving your changes). =20 Remember: only in the right encoding you can see the right characters =20= because one byte value represents dozens of different characters in =20 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.