bug-gnulib
[Top][All Lists]
Advanced

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

Re: UTF-8 support


From: Bob Proulx
Subject: Re: UTF-8 support
Date: Mon, 11 Jul 2005 23:49:54 -0600
User-agent: Mutt/1.5.9i

Paul Eggert wrote:
> Bruno Haible <address@hidden> writes:
> > Paul Eggert wrote:
> >> I read your email containing accented letters with GNU Emacs 21.4 and
> >> Gnus 5.10.6, a combination that supports UTF-8.
> >
> > The UTF-8 support in Emacs 21.4 is minimal. Some people recommend the
> > emacs-unicode-2 branch of the Emacs CVS. (Haven't tried it.)
> 
> Me neither.  But I should be clear that this problem wasn't really
> Emacs; it was xterm's.

I am using the Debian stock emacs with UTF-8 without problems
displaying characters.  (Composing characters can be ... interesting.)

> > The fact that "uxterm" is not called "xterm" makes it ignore the .Xdefaults
> > settings for "xterm".
> 
> Well, I'm using Gnome, and it ignores .Xdefaults entirely.  You're
> supposed to use .Xresources.  I don't know why they renamed it.  But
> uxterm seems to pick up my .Xresources settings.

The .Xdefaults is still used if there are no xrdb resources loaded.
There is a priority hierarchy of X resources for an application that
includes about a zillion different places and ways to get resources.
It is a little bit of a mess.

The xrdb (X resource database) is in memory without any filename at
all.  By convention the startx script would load the ~/.Xresources
file into memory using xrdb.  It passes the file through the cpp.  In
the .Xdefaults the comment is # but if passing through cpp that causes
problems so ! is used as a comment instead.  And of course the cpp
will strip C style /* ... */ comments so those are allowed in too.
Since the syntax is different between the files they ended up with
different filenames.  Really the .Xresources could be called anything
you desired if you ran xrdb yourself in your startup files.

If there is data in the xrdb then the .Xdefaults file is not used.
Using xrdb is better than the .Xdefaults file because it is attached
to the $DISPLAY.  The .Xdefaults is attached to $HOME.  If you and I
both share a login then we fight over .Xdefaults.  But with xrdb we
each can customize our own display independently.

> > Also you need to be careful about the fonts that you use with it.
> 
> Yes.  Fonts are a pain.  Debian has disabled bitmapped fonts to some
> extent, which made my conversion even more interesting.  Thanks for
> your scripts, though: I'll salt them away for ideas when I have the
> time.  (None of them work for me unchanged -- how typical.  :-)

I started on a micro-howto for setting up UTF-8.  I should dust that
off and finish it.  It is really not that difficult once the tricks of
fonts to choose are known.  For Debian you need sarge or later to
enable everything out of the box but with sarge or later it is very
easy.

> I am starting to give up on running Emacs-over-xterm, and am going
> more with a straight X connection using OpenSSH's compression.  It
> might be adequate with my home DSL line, though it's clearly not as
> zippy as Emacs-over-xterm was.  I think this will fix that particular
> UTF-8 glitch (so that I can be ready for the next one :-).

I use both interchangeably.  Obviously emacs in xterm is limited to
the fonts and colors available to xterm.  But with a reasonable
unicode font it works well enough.  I personally won't give up on text
mode terminals because I have the same performance issues of running
over a slow internet network connection.  It works for me.  I say this
so that if you don't want to give up on text mode that it will cheer
you up a little to think that you probably don't have to do so either.

Bob




reply via email to

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