emacs-devel
[Top][All Lists]
Advanced

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

Re: Hunspell 1.6 on Msys2


From: Eli Zaretskii
Subject: Re: Hunspell 1.6 on Msys2
Date: Thu, 19 Jan 2017 17:56:25 +0200

> From: Arash Esbati <address@hidden>
> Cc: address@hidden
> Date: Thu, 19 Jan 2017 10:04:54 +0100
> 
> Debugger entered--Lisp error: (error "Ispell misalignment: word 
> ‘\334bersetzugn’ point 43; probably incompatible versions")

Forget about all I said, I've succeeded in reproducing this now.
(Previously, I used "M-$" instead of "M-x ispell", and ispell-word
somehow succeeds to work in this case.)

This is a bug in Hunspell 1.6: it seems to ignore the "-i UTF-8"
command-line switch, and sends its output in Latin-1 (perhaps because
the de_DE dictionary uses that encoding).  With a file to-spell.tex
using the same text you show in your recipe and encoded in UTF-8, try
this from the Windows command line:

  cat to-spell.tex | hunspell -a "" -d de_DE -i UTF-8 > hunspell-1.6.txt

Then visit the file hunspell-1.6.txt -- you will see that it shows
Übersetzugn in Latin-1 encoding, although the -i switch requested that
the UI be in UTF-8.

It's possible that this is a kludgey "feature" in Hunspell 1.6, meant
as a stop-gap for the long-standing bug in Hunspell, whereby it
reports offsets in bytes, not in characters.  It could be that the
Hunspell developers made this change in behavior to make the problem
less acute.  But it's a bug anyway.

The solution is to fix Hunspell, of course.  Failing that, a
workaround would be to customize your Emacs to use single-byte
encodings for dictionaries with which you need to work.  One way to do
that is to set up the coding-systems of the Hunspell process
accordingly.  But that could be messy, as ispell.el is quite set on
using UTF-8 with Hunspell and Aspell.



reply via email to

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