From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Problem with viper-replace-char and Swedish characters on w32 Date: Wed, 29 Mar 2006 22:46:00 +0200 Message-ID: <442AF208.6090705@student.lu.se> References: <4423DA03.2040503@student.lu.se> <442AE207.6000802@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1143665205 23832 80.91.229.2 (29 Mar 2006 20:46:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 29 Mar 2006 20:46:45 +0000 (UTC) Cc: Michael Kifer , Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 29 22:46:40 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FOhYk-0005Jz-TX for ged-emacs-devel@m.gmane.org; Wed, 29 Mar 2006 22:46:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FOhYk-0007dI-8f for ged-emacs-devel@m.gmane.org; Wed, 29 Mar 2006 15:46:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FOhYW-0007bC-OP for emacs-devel@gnu.org; Wed, 29 Mar 2006 15:46:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FOhYU-0007b0-7D for emacs-devel@gnu.org; Wed, 29 Mar 2006 15:46:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FOhYU-0007ax-2G for emacs-devel@gnu.org; Wed, 29 Mar 2006 15:46:14 -0500 Original-Received: from [81.228.8.83] (helo=pne-smtpout1-sn2.hy.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FOhaV-0002Fk-Dk for emacs-devel@gnu.org; Wed, 29 Mar 2006 15:48:19 -0500 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout1-sn2.hy.skanova.net (7.2.070) id 442A999400017DFA; Wed, 29 Mar 2006 22:46:00 +0200 User-Agent: Thunderbird 1.5 (Windows/20051201) Original-To: Stefan Monnier In-Reply-To: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52197 Archived-At: Stefan Monnier wrote: >> This gives incorrect display of character if it is a Swedish character (like >> o with two dots above) under the conditions I explained before (Swedish >> keyboard, Local English). The code below gives the desired result: >> > > >> (let ((last-command-char (read-char "c:"))) (self-insert-command 1)) >> > > This will not obey keyboard-coding-system but > nonascii-translation-table instead. So it will work OK sometimes, but is > not what you want. But note that this is also what quoted-insert uses, so > it's no worse than the normal C-q. > > > Stefan > Thanks, Stefan. Is something like this what should be done then: (let* ((ch (read-char "cs:"))) (insert (decode-coding-string (char-to-string ch) (keyboard-coding-system)))) --lennart