From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9_?= =?UTF-8?Q?=D0=A1=D1=83=D1=89=D0=B5=D0=BD=D0=BA=D0=BE?= Newsgroups: gmane.emacs.bugs Subject: bug#7781: [PATCH] Fix ispell problem with hunspell and UTF-8 file Date: Sat, 13 Apr 2013 23:12:38 +0400 Message-ID: <5169AE26.1000403@yandex.ru> References: <87sjx9fula.fsf@sc3d.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060404020300020106050208" X-Trace: ger.gmane.org 1365896531 20467 80.91.229.3 (13 Apr 2013 23:42:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Apr 2013 23:42:11 +0000 (UTC) To: 7781@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 14 01:42:15 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1URA5E-0004so-IB for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Apr 2013 01:42:12 +0200 Original-Received: from localhost ([::1]:55464 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URA5E-0007Fs-7u for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Apr 2013 19:42:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URA57-0007Ej-TV for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2013 19:42:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URA52-0006QS-Di for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2013 19:42:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URA52-0006QL-5l for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2013 19:42:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1URA8w-0000XM-NY for bug-gnu-emacs@gnu.org; Sat, 13 Apr 2013 19:46:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87sjx9fula.fsf@sc3d.org> Resent-From: =?UTF-8?Q?=D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9_?= =?UTF-8?Q?=D0=A1=D1=83=D1=89=D0=B5=D0=BD=D0=BA=D0=BE?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Apr 2013 23:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7781 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7781-submit@debbugs.gnu.org id=B7781.13658967271997 (code B ref 7781); Sat, 13 Apr 2013 23:46:02 +0000 Original-Received: (at 7781) by debbugs.gnu.org; 13 Apr 2013 23:45:27 +0000 Original-Received: from localhost ([127.0.0.1]:49303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1URA8M-0000W2-6i for submit@debbugs.gnu.org; Sat, 13 Apr 2013 19:45:27 -0400 Original-Received: from forward7.mail.yandex.net ([77.88.61.37]:41689) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UR5x2-0008L1-1Z for 7781@debbugs.gnu.org; Sat, 13 Apr 2013 15:17:29 -0400 Original-Received: from smtp7.mail.yandex.net (smtp7.mail.yandex.net [77.88.61.55]) by forward7.mail.yandex.net (Yandex) with ESMTP id 596311C0390 for <7781@debbugs.gnu.org>; Sat, 13 Apr 2013 23:12:39 +0400 (MSK) Original-Received: from smtp7.mail.yandex.net (localhost [127.0.0.1]) by smtp7.mail.yandex.net (Yandex) with ESMTP id 3516C1580524 for <7781@debbugs.gnu.org>; Sat, 13 Apr 2013 23:12:39 +0400 (MSK) Original-Received: from ppp95-165-99-165.pppoe.spdop.ru (ppp95-165-99-165.pppoe.spdop.ru [95.165.99.165]) by smtp7.mail.yandex.net (nwsmtp/Yandex) with ESMTP id l8xntAtQc2-CchWL8FN; Sat, 13 Apr 2013 23:12:38 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1365880359; bh=+2WCRn5ZJIZ/wrEPqM+iHUFjD7+PSpKqVRnBDyQGXTs=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type; b=v99LkM8ni70h4iQc8K2P9k612zgyHDLk5KXEE+zJ3IzYxUc8E4MCfzrx/BHd1Xvwd iFr+4ZYx3kyhP7bZgFh8aZfGPNlL7i3WeocgpSCFrsxXqqIWZOvVZ6blzrhayKffGt /em4PR+9iZDf76CGLzW+CDD/+PSn4wSDcQ23n3Mg= Authentication-Results: smtp7.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 X-Mailman-Approved-At: Sat, 13 Apr 2013 19:45:19 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:73386 Archived-At: This is a multi-part message in MIME format. --------------060404020300020106050208 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit As soon as I can see, the hunspell team haven't fixed the bug in more then 2 years. Maybe for them it is not a bug but a feature. The problem is that hunspell reports byte-position instead of char-position with multi-byte character input, while Emacs waits for char-position. With the patch attached I propose to make conversation in the ispell-parse-output function. Thanks, Nikolay Suschenko --------------060404020300020106050208 Content-Type: text/plain; charset=UTF-8; name="ispell.el.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="ispell.el.patch" LS0tIGEvbGlzcC90ZXh0bW9kZXMvaXNwZWxsLmVsCTIwMTMtMDItMjIgMTM6MDk6MjYuMDAw MDAwMDAwICswNDAwCisrKyBiL2xpc3AvdGV4dG1vZGVzL2lzcGVsbC5lbAkyMDEzLTA0LTEz IDIyOjQ2OjM1LjIwOTMyMzU4NCArMDQwMApAQCAtMjU5Nyw3ICsyNTk3LDExIEBACiAJICAo c2V0cSBjb3VudCAwKQkJOyBubyBtaXNzZXMgZm9yIHR5cGUgIwogCShzZXRxIGNvdW50IChz dHJpbmctdG8tbnVtYmVyIG91dHB1dCkgOyBnZXQgbnVtYmVyIG9mIG1pc3Nlcy4KIAkgICAg ICBvdXRwdXQgKHN1YnN0cmluZyBvdXRwdXQgKDErIChzdHJpbmctbWF0Y2ggIiAiIG91dHB1 dCAxKSkpKSkKLSAgICAgIChzZXRxIG9mZnNldCAoc3RyaW5nLXRvLW51bWJlciBvdXRwdXQp KQorICAgICAgOyBodW5zcGVsbCByZXBvcnRzIGJ5dGUtcG9zaXRpb24gaW5zdGVhZCBvZiBj aGFyLXBvc2l0aW9uCisgICAgICA7IHdpdGggbXVsdGktYnl0ZSBjaGFyYWN0ZXIgaW5wdXQK KyAgICAgIChzZXRxIG9mZnNldCAoaWYgaXNwZWxsLXJlYWxseS1odW5zcGVsbAorCQkgICAg ICAgKGJ5dGUtdG8tcG9zaXRpb24gKHN0cmluZy10by1udW1iZXIgb3V0cHV0KSkKKwkJICAg ICAoc3RyaW5nLXRvLW51bWJlciBvdXRwdXQpKSkKICAgICAgIChzZXRxIG91dHB1dCAoaWYg KGVxIHR5cGUgPyMpICAgICA7IE5vIG1pc3Mgb3IgZ3Vlc3MgbGlzdC4KICAgICAgICAgICAg ICAgICAgICAgICAgbmlsCiAgICAgICAgICAgICAgICAgICAgICAoc3Vic3RyaW5nIG91dHB1 dCAoMSsgKHN0cmluZy1tYXRjaCAiICIgb3V0cHV0IDEpKSkpKQo= --------------060404020300020106050208--