[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with viper-replace-char and Swedish characters on w32
From: |
Lennart Borgman |
Subject: |
Problem with viper-replace-char and Swedish characters on w32 |
Date: |
Fri, 24 Mar 2006 12:37:39 +0100 |
User-agent: |
Thunderbird 1.5 (Windows/20051201) |
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
- Problem with viper-replace-char and Swedish characters on w32,
Lennart Borgman <=
- Re: Problem with viper-replace-char and Swedish characters on w32, Lennart Borgman, 2006/03/29
- Re: Problem with viper-replace-char and Swedish characters on w32, Stefan Monnier, 2006/03/29
- Re: Problem with viper-replace-char and Swedish characters on w32, Lennart Borgman, 2006/03/29
- Re: Problem with viper-replace-char and Swedish characters on w32, Stefan Monnier, 2006/03/29
- Re: Problem with viper-replace-char and Swedish characters on w32, Lennart Borgman, 2006/03/29
- Re: Problem with viper-replace-char and Swedish characters on w32, Stefan Monnier, 2006/03/29
- Re: Problem with viper-replace-char and Swedish characters on w32, Lennart Borgman, 2006/03/29
- Re: Problem with viper-replace-char and Swedish characters on w32, Stefan Monnier, 2006/03/30
- Re: Problem with viper-replace-char and Swedish characters on w32, Lennart Borgman, 2006/03/30