unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Problem with viper-replace-char and Swedish characters on w32
@ 2006-03-24 11:37 Lennart Borgman
  2006-03-29 19:37 ` Lennart Borgman
  0 siblings, 1 reply; 11+ messages in thread
From: Lennart Borgman @ 2006-03-24 11:37 UTC (permalink / raw)


This is for Emacs on w32. There is a problem in viper when replacing a 
character (using the "r" command - `viper-repace-char') with a Swedish 
character. (For example ö which is an o with two dots above.)

I am using Swedish keyboard layout. Under w2k this is set in Control 
Panel - Regional Settings - Input Locales - Keyboard Layout. I have 
tested two different locales, which gives different results below. The 
locales are found under ... - Regional Settings - General - Your Locale.

I start with

emacs -Q

enter some characters and then do

M-x viper-mode <RET>

I move point to somewhere in the text and then press "r" and a 
character. This replaces a single character with the new one I typed. I 
am doing this in the *scratch* buffer. I get the following results:

1) When I use local Swedish the correct character is inserted (o with 
two dots above). Trying to save the buffer (C-x C-w) I get a message saying:

 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
These default coding systems were tried to encode text
in the buffer `oe-local-sv.txt':
iso-latin-1-dos
However, each of them encountered these problematic characters:
iso-latin-1-dos: ⃶ ෶਀
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Where the question marks I see above in Thunderbird looks as o with two 
dots in Emacs.

2) When I use local English (United States) I see \366 in the buffer. 
Trying to save the buffer (C-x C-w) I get a message saying:

 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
These default coding systems were tried to encode text
in the buffer `oe-local-en.txt':
iso-latin-1
However, each of them encountered these problematic characters:
iso-latin-1: ෶਀
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Here the question marks looks like \366 in Emacs.

-------------------------------
I am not sure where the problem is. I suggested earlier a change in 
`viper-special-read-and-insert-char'. This seems to cure the problem, 
but I suspects something totally different might be the correct cure.

diff -c \eclean\bld\emacs\lisp\emulation/viper-cmd.el ./viper-cmd.el
> *** \eclean\bld\emacs\lisp\emulation/viper-cmd.el	2005-12-09 21:29:12.848928500 +0100
> --- ./viper-cmd.el	2006-01-27 22:38:43.472822400 +0100
> ***************
> *** 872,879 ****
>   	       (if (eq ch ?\C-m) (setq ch ?\n))
>   	       ;; Make sure ^V and ^Q work as quotation chars
>   	       (if (memq ch '(?\C-v ?\C-q))
> ! 		   (setq ch (read-char)))
> ! 	       (insert ch))
>   	      )
>   	(setq last-command-event
>   	      (viper-copy-event (if viper-xemacs-p
> --- 872,882 ----
>   	       (if (eq ch ?\C-m) (setq ch ?\n))
>   	       ;; Make sure ^V and ^Q work as quotation chars
>   	       (if (memq ch '(?\C-v ?\C-q))
> ! 		   (setq ch (read-char-exclusive)))
> ! 	       ;;(insert ch)
> !                (let ((last-command-char ch))
> !                  (self-insert-command 1))
> !                )
>   	      )
>   	(setq last-command-event
>   	      (viper-copy-event (if viper-xemacs-p
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-04-19 21:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-24 11:37 Problem with viper-replace-char and Swedish characters on w32 Lennart Borgman
2006-03-29 19:37 ` Lennart Borgman
2006-03-29 20:18   ` Stefan Monnier
2006-03-29 20:46     ` Lennart Borgman
2006-03-29 21:01       ` Stefan Monnier
2006-03-29 21:14         ` Lennart Borgman
2006-03-29 22:45           ` Stefan Monnier
2006-03-29 22:58             ` Lennart Borgman
2006-03-30 22:20               ` Stefan Monnier
2006-03-30 22:36                 ` Lennart Borgman
2006-04-19 21:36                   ` Lennart Borgman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).