Bug 725235

Summary: Spell check problem (UTF8 conversion?) with Hunspell
Product: [Fedora] Fedora Reporter: Emmanuel Kowalski <emmanuel.kowalski>
Component: emacsAssignee: Karel Klíč <kklic>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: aalam, i18n-bugs, jlgonzal, jonathan.underwood, kklic, rvokal, tagoh
Target Milestone: ---Keywords: i18n, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 915448 (view as bug list) Environment:
Last Closed: 2013-02-13 10:55:34 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
Sample text with accents (md5sum f91f52b0ae84fd91aa25e0d671228a23) none

Description Emmanuel Kowalski 2011-07-24 10:12:11 EDT
Created attachment 514921 [details]
Sample text with accents (md5sum f91f52b0ae84fd91aa25e0d671228a23)

Description of problem:
When using emacs / hunspell to spell-check a UTF-8 encoded text file, emacs chokes on some accented letters, with the error message:

Ispell error: UTF-8 encoding error. Missing continuation byte in 0. character position:
Spell-checking testtext.txt using hunspell with default dictionary...done
ispell-process-line: Wrong type argument: number-or-marker-p, nil

Version-Release number of selected component (if applicable):



How reproducible:
Always on my netbook with Fedora 15 for i686.

Steps to Reproduce:
1. Open a text file with accented characters, e.g. the attached test case.
2. Start spell-check in emacs (after making sure that aspell is not installed, so that emacs will use hunspell.)
Actual results:
Error message as above.

Expected results:
Correct spell-checking session...

Additional info:
This does not happen with aspell.
It also does not happen when spell-checking files using hunspell on the command line.

For some other files, the error message was:
"this UTF-8 encoding can't convert to UTF-16"

Using "enter debugger on error" on the text file, the following appears in *Backtrace* (with byte code removed):

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  ispell-parse-output(#("ël!" 0 3 (charset iso-8859-1)) nil 0)
  ispell-process-line("^Titre: noël!\n" nil)
  ispell-region(1 38)
  call-interactively(ispell-buffer nil nil)
Comment 1 Akira TAGOH 2012-06-29 07:00:33 EDT
ispell.el has the code to find the spell checker program out though, it doesn't update ispell-dictionary-base-alist according to the result. it should be optimized against it.

Here is what my .emacs has and I want English spell checker only:

(setq ispell-dictionary-base-alist '((nil
                                      "[[:alpha:]]" "[^[:alpha:]]" "[']"
                                      nil ("-d" "en_US") nil utf-8)))
(eval-after-load "ispell"
    (setq ispell-extra-args '("-a" "-i" "utf-8")
          ispell-silently-savep t)))

It work well here.
Comment 2 Fedora End Of Life 2013-01-16 09:39:38 EST
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 3 Fedora End Of Life 2013-02-13 10:55:37 EST
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 4 José Luis González 2013-05-10 04:58:14 EDT
This is still happening on Fedora 18.

I respectfully disagree with the CLOSED-WONTFIX status. This is a major feature that doesn't work out of the box. The proposed solution doesn't work in my box, and the relevant sections of the built-in help and the info documentation say nothing about having to configure additional things to make it work or how.

I request that the bug be opened and a solution be worked out, either in code or as a *working* note in the documentation.