Bug 353133

Summary: Spell check does not work with German Umlaute (UTF-8)
Product: [Frameworks and Libraries] frameworks-sonnet Reporter: orelie
Component: generalAssignee: Martin Sandsmark <martin.sandsmark>
Status: RESOLVED FIXED    
Severity: normal CC: arojas, joelfft, kdelibs-bugs, lukasz.wojnilowicz
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description orelie 2015-09-24 11:46:15 UTC
Since my update to plasma5, my kmail spell checker does not work correctly anymore.
It marks every word with German Umlaute as wrong and suggests a wrongly encoded version of the same word.
I'm using hunspell-de and saw that the dicts in /usr/share/hunspell are ISO encoded (and a content line says "SET ISO8859-1")
So I tried iconv'ing them (and changed the content line from ISO to UTF).
That at least made kmail to correct the Umlaut words with rightly encoded versions (so actually replace it with the same word again) - which is still marked as wrong


Reproducible: Always

Steps to Reproduce:
1. Compose an E-Mail
2. Enable automatic spell checking
3. Write "gleichgroß" 
4. Right click -> suggestions

Actual Results:  
gleichgro�

Expected Results:  
gleichgroß
Comment 1 Milian Wolff 2015-09-25 01:10:58 UTC
I've seen the same, let's dig into it!
Comment 2 Milian Wolff 2015-09-25 01:15:28 UTC
I can also reproduce the same in Kate, so this looks like a general problem within Sonnet to me.
Comment 3 Milian Wolff 2015-09-25 01:37:33 UTC
Git commit a8bc5db8247abc4ec8aa75ca1e91d70415b3efa4 by Milian Wolff.
Committed on 25/09/2015 at 01:35.
Pushed by mwolff into branch 'master'.

Do not assume UTF-8 encoded Hunspell dictionaries.

Instead, use QTextCodec together with Hunspell::get_dic_encoding
to handle various encodings easily.

This fixes the problems with umlauts etc. in German dictionaries,
which are apparently ISO8859-1 encoded on some systems.

M  +18   -5    src/plugins/hunspell/hunspelldict.cpp
M  +4    -0    src/plugins/hunspell/hunspelldict.h

http://commits.kde.org/sonnet/a8bc5db8247abc4ec8aa75ca1e91d70415b3efa4
Comment 4 Antonio Rojas 2015-09-25 06:11:58 UTC
*** Bug 343268 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Feck 2015-10-10 22:27:44 UTC
*** Bug 353632 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Feck 2015-10-10 22:28:12 UTC
*** Bug 349679 has been marked as a duplicate of this bug. ***