help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: word syntax/umlauts emacs 23 vs 22


From: Stefan Monnier
Subject: Re: word syntax/umlauts emacs 23 vs 22
Date: Wed, 08 Dec 2010 15:32:42 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> | I cannot reproduce it.  What is your LANG/LC_ALL setting?
> LANG=de_DE.UTF-8

> | > I use unibyte in regular use.
> | How do you tell Emacs to use unibyte?
> I just recognized that I had set EMACS_UNIBYTE in the environment.

> If I unset this and start /usr/bin/emacs -Q, I get correct word-movement
> on Umlauts inserted on a german keyboard.

Great.

> Now we still have basically all of our files in unibyte encoding, and

"unibyte encoding" is a term that makes sense here, but searching for it
won't put you on the right track, I'm afraid ;-)

> the show as M\374ller, with the single-byte Umlauts as escape sequences,

Your "unibyte encoding" is most likely latin-1 or latin-9, so your
problem now is that Emacs for some reason does not try latin-1 for those
files that don't use utf-8.

C-x RET r latin-1 RET should cause the file to be re-read as a latin-1
file, and it should then be displayed properly.  Now, the question is
why didn't Emacs recognize the file as a latin-1 file.

If you do

   emacs23 -Q ~/tmp/foo.txt
   
where foo.txt is a file encoded in latin-1 that contains Müller and some
more ASCII text, Emacs should properly recognize the file as latin-1 (as
indicated in the leftmost part of the mode-line by "-1:") and the
ü should be recognized and displayed fine.  At least it works for me
(and many more people).
So if that doesn't work for you, there's something more going on (maybe
you'll want to try it with different files, because it may be a problem
in the file's encoding).

> and word-movement stops at the non-ascii char.  I found that if I
> customize the latin1-display Variable, they show up as Umlauts, and
> word-movement also behaves properly.  Is setting latin1-display the
> Right Thing to work with the unibyte files?

No, the "latin1-display" thingy, as the name implies, deals with display
and hence just works around the problem, just like your reliance on
UNIBYTE did.


        Stefan


reply via email to

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