From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Hunspell 1.6 on Msys2 Date: Thu, 19 Jan 2017 17:56:25 +0200 Message-ID: <83mven6o2e.fsf@gnu.org> References: <86a8apjprg.fsf@gnu.org> <83lgu982bb.fsf@gnu.org> <861sw0k6ps.fsf@gnu.org> <83h94w8jp9.fsf@gnu.org> <86fukg5jzk.fsf@gnu.org> <8337gg8c1m.fsf@gnu.org> <86inpcmcuq.fsf@gnu.org> <83wpds6uxq.fsf@gnu.org> <83vatc6ur2.fsf@gnu.org> <86bmv4m9e2.fsf@gnu.org> <83shog6sm0.fsf@gnu.org> <86shofju89.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1484843569 9916 195.159.176.226 (19 Jan 2017 16:32:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 19 Jan 2017 16:32:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: Arash Esbati Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 19 17:32:41 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUFdZ-0001PX-Oy for ged-emacs-devel@m.gmane.org; Thu, 19 Jan 2017 17:32:33 +0100 Original-Received: from localhost ([::1]:49475 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUFde-00022I-MA for ged-emacs-devel@m.gmane.org; Thu, 19 Jan 2017 11:32:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUF4v-0008B2-EV for emacs-devel@gnu.org; Thu, 19 Jan 2017 10:56:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUF4q-0001O2-KS for emacs-devel@gnu.org; Thu, 19 Jan 2017 10:56:45 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUF4q-0001Nv-I0 for emacs-devel@gnu.org; Thu, 19 Jan 2017 10:56:40 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3362 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cUF4o-0004cb-VY; Thu, 19 Jan 2017 10:56:39 -0500 In-reply-to: <86shofju89.fsf@gnu.org> (message from Arash Esbati on Thu, 19 Jan 2017 10:04:54 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:211404 Archived-At: > From: Arash Esbati > Cc: emacs-devel@gnu.org > 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.