From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: Anton Zinoviev Newsgroups: gmane.emacs.devel Subject: Re: "Outer world" encoding for non-Latin1 language environments Date: Fri, 1 Mar 2002 20:00:58 +0200 Message-ID: <20020301200057.A25880@fmi.uni-sofia.bg> References: <20020227132949.C18112@fmi.uni-sofia.bg> NNTP-Posting-Host: quimby2.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: quimby2.netfonds.no 1015005010 31359 195.204.10.66 (1 Mar 2002 17:50:10 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 1 Mar 2002 17:50:10 GMT Cc: Anton Zinoviev , emacs-devel@gnu.org Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16grAX-00089h-00 for ; Fri, 01 Mar 2002 18:50:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16gr5i-0003Mt-00; Fri, 01 Mar 2002 12:45:10 -0500 Original-Received: from eru.fmi.uni-sofia.bg ([62.44.101.36] helo=debian.fmi.uni-sofia.bg) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16gqhF-0008PT-00 for ; Fri, 01 Mar 2002 12:19:54 -0500 Original-Received: from mail.fmi.uni-sofia.bg (mail.fmi.uni-sofia.bg [62.44.101.4]) by debian.fmi.uni-sofia.bg (Postfix) with ESMTP id 5C95211D314 for ; Fri, 1 Mar 2002 19:19:48 +0200 (EET) Original-Received: from logic.fmi.uni-sofia.bg ([62.44.100.59]) by mail.fmi.uni-sofia.bg (Netscape Messaging Server 3.62) with ESMTP id 553; Fri, 1 Mar 2002 19:11:08 +0200 Original-Received: from zinoviev by logic.fmi.uni-sofia.bg with local (Exim 3.12 #1 (Debian)) id 16grL2-0006li-00; Fri, 01 Mar 2002 20:01:00 +0200 Original-To: Eli Zaretskii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from eliz@is.elta.co.il on Wed, Feb 27, 2002 at 01:10:41PM +0200 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: quimby.gnus.org gmane.emacs.devel:1676 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1676 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? _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel