unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmx.net>
Cc: handa@m17n.org
Subject: Re: Russian letters
Date: Sat, 8 Jul 2006 18:30:12 +0300	[thread overview]
Message-ID: <200607081830.12937.pogonyshev@gmx.net> (raw)
In-Reply-To: <ufyhcp94b.fsf@gnu.org>

Eli Zaretskii wrote:
> > From: Paul Pogonyshev <pogonyshev@gmx.net>
> > Date: Fri, 7 Jul 2006 22:59:40 +0300
> > 
> > >     utf-fragment-on-decoding's value is nil
> > > 
> > >     Whether or not to decode some chars in UTF-8/16 text into iso8859 charsets.
> > >     [...]
> > 
> > Why not do the same to the typed characters?
> 
> Maybe it does, let's find out: how did you type those characters?  Did
> you use a Leim input method (which one?), or did you type them on your
> keyboard?

I think it is Leim input method `russian-computer'.  I.e. I use `C-\' in
Emacs to switch between US Engish and Russian keyboard layouts.

> > Current behavior is inconsistent---some characters are decoded (into
> > iso-8859 charsets), some are not.
> 
> I think it is consistent in the default configuration.

Yes, in the default.  But not if you change `utf-fragment-on-decoding',
I think.

> > > The reason why the default value is nil is precisely that most users
> > > will not want the fragmentation, they will want the characters to
> > > belong to a single character set.
> > 
> > I understand you, but actually, most users do not bother.  Emacs should
> > work `out of the box' and display the characters.
> 
> It does work `out of the box', if you don't change the value of
> utf-fragment-on-decoding.

And displays boxes in place of Russian characters (all of them.)  If
`utf-fragment-on-decoding' is non=nil, it displays read characters fine,
but not the newly typed characters.

> > Why doesn't Emacs try to decode characters on displaying?
> 
> Decoding happens on input, when the characters are inserted into a
> buffer, not when they are displayed.  Such insertion occurs when you
> either (a) type the characters at the keyboard, or (b) visit a file,
> or (c) paste them from an X selection or a clipboard, or (d) read
> output of some process which interacts with Emacs.  (I hope I didn't
> forget any other possibilities.)
> 
> If you describe how you typed those characters, maybe we will find a
> bug that needs to be fixed.

Maybe I used imprecise words.  We know that Emacs can display Russian
characters if they decoded into a national ISO charset.  The same
(conceptually, from the user point of view) characters are shown as
boxes when they are in UTF charset.  It should be possible to display
ranges from UTF charset as national charsets.  I.e. if character
U+0430 is displayed as ISO-8859-5 0x50, all problems solved.  No
matter how the characters are encoded, if they conceptually are the
same, they should be displayed using the same method, no?

> > > Did you set this variable to a non-nil value in your .emacs?  If so,
> > > how about removing that customization?  If the reason is that you
> > > don't have Unicode fonts installed, I think installing them is a
> > > better solution.
> > 
> > I use Debian Sarge which is only 1 year old.  And Emacs doesn't work
> > with its standard font and Cyrillic letters as is.  (Well, I didn't
> > try the standard package, but CVS `emacs -Q' shows boxes.)  I had enough
> > persistence to find the reason (here, thank you), but most users won't.
> > Especially since Emacs cannot even list font families (at least I don't
> > know how.)
> 
> I still don't understand whether you modified the value of
> utf-fragment-on-decoding or it came that way with Debian Sarge.  In
> the latter case, I think it's something to complain about to Debian
> maintainers.

I think modification of `utf-fragment-on-decoding' is a remnant of the
times I tried to solve Russian characters problem.  Maybe it worked then,
not sure.

> The missing fonts is also an issue with Debian, I think.  Perhaps they
> have an optional package you need to install, but since you live in a
> Cyrillic locale (if I understand correctly the headers of your
> message), I find it hard to believe that your system lacks Unicode
> fonts that don't support Cyrillic characters.

I'll try writing to Debian.  However, Emacs does poor job: while it _can_
show Cyrillic characters in `adobe-courier', it does so only when they are
in a certain encoding.

Cronyx fonts do indeed support Russian characters.  However, customizing
`default' face to use cronyx-courier for some reason influences only the
current Emacs session.  Bug?

In the current session: I customize the default face to use `cronyx-courier'
and press the ``Save for Future Sessions'' button.  Cyrillic characters
are now displayed with the Cronyx font, but ASCII characters are shown with
`adobe-courier'...

A new session: all characters are shown with `adobe-courier'.  In particular,
Cyrillic characters are shown as boxes.  `.emacs' does indeed contain
`cronyx-courier', but for some reason it doesn't take effect at all...

Actually, I now see that I had this problem before and wrote about it in
``Pango-like font fallback (was Re: Russian numero sign)'' thread:

    I went to install all the fonts I could find in my Debian Sarge.  And
    found cronyx-courier font, which looks nice _and_ has Cyrillic
    characters.  However, when I customize the default face in Emacs and
    set that font family, latin characters are still displayed in
    adobe-courier (though Cyrillic ones are shown in cronyx-courier)...
    And the customization doesn't take any effect after I restart Emacs...
    Any ideas?

Kenichi Handa answered:

   Perhaps that because you don't have
   -cronyx-courier-...-iso8859-1.  Emacs by default uses an
   iso8859-1 font for ASCII.  To change it, you must create a
   proper fontset by one of these ways: [...]

How an average user is supposed to find it is beyond me.  I disovered it
only here.

Paul

  reply	other threads:[~2006-07-08 15:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-05 18:10 Russian letters Paul Pogonyshev
2006-07-05 18:19 ` Andreas Schwab
2006-07-05 21:43   ` Paul Pogonyshev
2006-07-05 22:08     ` Andreas Schwab
2006-07-05 22:21       ` Paul Pogonyshev
2006-07-05 22:55         ` Andreas Schwab
2006-07-06 15:59           ` Paul Pogonyshev
2006-07-06 16:39             ` Andreas Schwab
2006-07-06 18:17               ` Paul Pogonyshev
2006-07-06 20:11                 ` Eli Zaretskii
2006-07-06  3:41         ` Eli Zaretskii
2006-07-06 15:56           ` Paul Pogonyshev
2006-07-06 20:12             ` Eli Zaretskii
2006-07-06 20:27               ` Paul Pogonyshev
2006-07-06 20:38                 ` Paul Pogonyshev
2006-07-07  8:41                   ` Eli Zaretskii
2006-07-06 21:14                 ` Eli Zaretskii
2006-07-06 21:48                   ` Paul Pogonyshev
2006-07-07  8:46                     ` Eli Zaretskii
2006-07-07 19:59                       ` Paul Pogonyshev
2006-07-08 12:35                         ` Eli Zaretskii
2006-07-08 15:30                           ` Paul Pogonyshev [this message]
2006-07-08 16:06                             ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=200607081830.12937.pogonyshev@gmx.net \
    --to=pogonyshev@gmx.net \
    --cc=handa@m17n.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).