emacs-devel
[Top][All Lists]
Advanced

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

Re: "Outer world" encoding for non-Latin1 language environments


From: Anton Zinoviev
Subject: Re: "Outer world" encoding for non-Latin1 language environments
Date: Fri, 1 Mar 2002 20:00:58 +0200
User-agent: Mutt/1.2.5i

On 27.II.2002 at 13:10 (+0200) Eli Zaretskii wrote:
> 
> On Wed, 27 Feb 2002, Anton Zinoviev wrote:
> 
> > Even when users choose some non-Latin1 language environment Emacs
> > doesn't suppose that it's new default encoding is actually the
> > encoding of the X-clipboard, the console font, etc.  This can be
> > easily changed in this way:
> 
> Why change it?  The default for X selections is compound-text, which can 
> handle many different languages/scripts mixed in a single selection.  
> What you propose (to set it to koi8-u) will limit the selections to a 
> single charset.  Why is that a good idea?

I was under impression that Emacs doesn't support compound-text.  It
doesn't touch command sequences and pasting from xterm gives something
like:

^[%/1\200\212\koi8-r^B......

where dots are Latin-1 letters instead of Cyrillic.

Many programs doesn't use such command-sequences and
set-clipboard-coding-system helps for pasting from them.  However the
right solution is to improve the support for compound-text in Emacs.
It should interpret these control sequences when pasting and generate
them when copying.  For the last task it has to know the defauld
encoding for the language environment and use it if possible because
most of the programs can'r reencode if you paste in them.

> > (defun setup-koi8u-coding-system () 
> >   (let ()
> >     (set-keyboard-coding-system 'koi8-u)
> >     (set-clipboard-coding-system 'koi8-u)
> >     (set-terminal-coding-system 'koi8-u)))
> 
> Whether defining a language environment should set keyboard and terminal 
> encodings is an old issue, but it isn't a clear-cut one.  It is possible 
> that someone defines a language environment but her keyboard and/or 
> terminal cannot cope with encoded characters.

In this case setting the keyboard won't make any harm to this user, as
then he or she can use some of the input methods provided by Emacs.
There is no situation when it might be usefull if Emacs interprets my
Cyrillic input as Latin1.

After wrong setting of the terminal encoding the user will see garbage
instead of question marks, so again that's not big harm.


Regards, Anton Zinoviev

P.S. Should I cc you when replying?



reply via email to

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