emacs-pretest-bug
[Top][All Lists]
Advanced

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

flyspell-buffer does not detect mistyped words with umlauts on Win32 + w


From: Michael Schierl
Subject: flyspell-buffer does not detect mistyped words with umlauts on Win32 + workaround
Date: Fri, 24 Mar 2006 14:46:03 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8) Gecko/20051201 Thunderbird/1.5 Mnenhy/0.7.3.0

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the address@hidden mailing
list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

When running flyspell-buffer on a LaTeX buffer that has German umlauts
in it (using dictionary german8), it ignores any words with umlauts, i.
e. it won't complain for wrong words and not for correct words either.

Instead, the *Messages* contains "word not found" messages for parts of
these words.

When setting `flyspell-large-region' to nil, it works perfectly (but
much slower). So the problem has to be in the flyspell-large-region
function.

Indeed, this function calls `call-process-region' to feed the buffer to
ispell. When replacing ispell by a small program that dumps stdin to a
file, German umlauts look "funny" in there, e. g. a "ΓΌ" is encoded as
two bytes 0x81 0xFC. So I think it is a coding system problem

After some more experiments I found a "solution". This simple patch
(which is of course not a proper fix since latin-1 is not appropriate
for the whole world) makes it work as I think it should.

=====cut here=====
--- flyspell.el.orig    2006-03-24 14:28:36.000000000 +0100
+++ flyspell.el 2006-03-24 14:29:40.000000000 +0100
@@ -1431,6 +1431,7 @@
     (if flyspell-issue-message-flag (message "Checking region..."))
     (set-buffer curbuf)
     (ispell-check-version)
+    (let ((coding-system-for-write 'iso-8859-1))
     (let ((c (apply 'call-process-region beg
                    end
                    ispell-program-name
@@ -1460,7 +1461,7 @@
            (with-current-buffer curbuf
              (flyspell-delete-region-overlays beg end))
            (flyspell-external-point-words))
-       (error "Can't check region...")))))
+       (error "Can't check region..."))))))

 ;;*---------------------------------------------------------------------*/
 ;;*    flyspell-region ...                                              */
=====cut here=====

In GNU Emacs 22.0.50.1 (i386-mingw-nt5.1.2600)
 of 2005-12-18 on NEUTRINO
X server distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags
-Ic:/Programme/GnuWin32/include'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: DEU
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t

Major mode: LaTeX

Minor modes in effect:
  iswitchb-mode: t
  partial-completion-mode: t
  delete-selection-mode: t
  pc-selection-mode: t
  recentf-mode: t
  show-paren-mode: t
  encoded-kbd-mode: t
  tooltip-mode: t
  auto-compression-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  line-number-mode: t
  transient-mark-mode: t




reply via email to

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