[Bug 941887] New: KF5 spell check does not work if hunspell dictionary is encoded using ISO-8859-1
http://bugzilla.opensuse.org/show_bug.cgi?id=941887 Bug ID: 941887 Summary: KF5 spell check does not work if hunspell dictionary is encoded using ISO-8859-1 Classification: openSUSE Product: openSUSE Factory Version: 201505* Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: bnc-team-screening@forge.provo.novell.com Reporter: ronisbr@gmail.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Created attachment 643964 --> http://bugzilla.opensuse.org/attachment.cgi?id=643964&action=edit Screenshot showing the bug (kwrite5) The spell checker of KF5 software using Brazilian Portuguese dictionary (I tried with both kwrite5 and kate5) is not working. Every word that has a non-ASCII character is not interpreted correctly by the software. I am uploading a screenshot of kwrite5 with the word "dependência" being incorrectly marked as wrong. If you see the suggestions, then it seems some kind of problem with the encoding. The STDOUT of kwrite shows that hunspell is saying that the word is wrong: katepart: katepart: [ (0, 0) -> (0, 11) ] katepart: [ (0, 0) -> (0, 11) ] ( [ (0, 0) -> (0, 11) ] ) katepart: added [ (0, 0) -> (0, 11) ] katepart: KTextEditor::DocumentPrivate(0x1bf38a0) [ (0, 0) -> (0, 11) ] katepart: [ (0, 0) -> (0, 11) ] katepart: KTextEditor::DocumentPrivate(0x1bf38a0) [ (0, 0) -> (0, 11) ] katepart: KTextEditor::DocumentPrivate(0x1bf38a0) [ (0, 0) -> (0, 11) ] "pt_BR" katepart: added [ (0, 0) -> (0, 11) ] "pt_BR" to the queue, which has a length of 1 katepart: for the range [ (0, 0) -> (0, 11) ] katepart: [ (0, 0) -> (0, 11) ] katepart: next spell checking "dependência" sonnet.plugins.hunspell: SpellerPlugin *HunspellClient::createSpeller(const QString &language) ; "pt_BR" sonnet.plugins.hunspell: HunspellDict::HunspellDict( const QString& lang ): "pt_BR" sonnet.plugins.hunspell: dddddd 0x34303f0 sonnet.plugins.hunspell: isCorrect : "dependência" sonnet.plugins.hunspell: result : 0 katepart: on-the-fly spell check done, queue length 0 Notice that if I type any word without non-ASCII characters, like "casa", "teclado", "computador", then the spell checker works correctly. Looking at the files /usr/share/hunspell/{pt_BR.dic, pt_BR.aff}, I saw that both are encoded using ISO-8859-1. Thus, I tried to download an UTF-8 version of those dictionaries in [1] and after that the reported problems with the spell checker were corrected. Thus, I am wondering if this is a bug in hunspell or if the Brazilian Portuguese dictionaries must be updated to UTF-8 versions. This bug is not affecting KDE 4 software like kmail and konqueror. System Information: NAME=openSUSE VERSION="20150813 (Tumbleweed)" VERSION_ID="20150813" PRETTY_NAME="openSUSE 20150813 (Tumbleweed) (x86_64)" ID=opensuse ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:opensuse:20150813" BUG_REPORT_URL="https://bugs.opensuse.org" HOME_URL="https://opensuse.org/" ID_LIKE="suse" plasma-frameworks=5.12.0-2.1 ---------- [1] https://github.com/titoBouzout/Dictionaries -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941887
http://bugzilla.opensuse.org/show_bug.cgi?id=941887#c3
--- Comment #3 from Ronan Chagas
http://bugzilla.opensuse.org/show_bug.cgi?id=941887
http://bugzilla.opensuse.org/show_bug.cgi?id=941887#c4
Wolfgang Bauer
http://bugzilla.opensuse.org/show_bug.cgi?id=941887
http://bugzilla.opensuse.org/show_bug.cgi?id=941887#c5
Wolfgang Bauer
http://bugzilla.opensuse.org/show_bug.cgi?id=941887
http://bugzilla.opensuse.org/show_bug.cgi?id=941887#c6
--- Comment #6 from Ronan Chagas
http://bugzilla.opensuse.org/show_bug.cgi?id=941887
http://bugzilla.opensuse.org/show_bug.cgi?id=941887#c7
Ronan Chagas
http://bugzilla.opensuse.org/show_bug.cgi?id=941887
http://bugzilla.opensuse.org/show_bug.cgi?id=941887#c8
--- Comment #8 from Wolfgang Bauer
I just found a fix. It seems that KDE 5 apps are looking for dictionaries in the folder:
/usr/share/myspell/dicts
But they are in:
/usr/share/myspell
Everything is working if I symlink /usr/share/myspell -> /usr/share/myspell/dicts
Hm. Actually sonnet should meanwhile look in /usr/share/hunspell by default: https://quickgit.kde.org/?p=sonnet.git&a=commit&h=cf05710228e72d052b00ba95d7a5c81663e4b7df https://quickgit.kde.org/?p=sonnet.git&a=commit&h=0e6edac621fbd366b126ebd851fbea21355e02d0 And I don't see this problem with 5.16.0 on my 13.2 system here.
This is the same bug that Fedora fixed here:
https://bodhi.fedoraproject.org/updates/FEDORA-2015-9522/kf5-sonnet-5.10.0-3. fc22
Well, that's quite an old version, we had a patch for this in our package as well.
Now, I can see that this bug is fixed, so I am closing it.
Ok, thanks for confirming.
However, I found two new bugs:
1) The problem with myspell dictionaries. 2) If I'm using GTK+ theme, I cannot see the wrong words in kwrite5 or kate (the red line below the word).
My question is: are these bugs already known or should I reported it?
I will see whether I can reproduce the first problem (in Tumbleweed). As indicated that should be fixed upstream, so maybe there's something wrong with the Tumbleweed package (should be resolved with the next update then I suppose). I cannot find a report about the second problem so it doesn't seem to be known. Although I cannot reproduce it either, misspelled words are underlined in red here with the GTK+ style too. Maybe it depends on the actual GTK2 theme used (I tried with Breeze-GTK and oxygen-gtk), or the color scheme? Maybe try to change the color for spelling errors in the texteditor settings. Btw, any reason for you to use the GTK+ style? Or are you running kwrite/kate inside GNOME? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941887
http://bugzilla.opensuse.org/show_bug.cgi?id=941887#c9
--- Comment #9 from Ronan Chagas
I cannot find a report about the second problem so it doesn't seem to be known. Although I cannot reproduce it either, misspelled words are underlined in red here with the GTK+ style too. Maybe it depends on the actual GTK2 theme used (I tried with Breeze-GTK and oxygen-gtk), or the color scheme? Maybe try to change the color for spelling errors in the texteditor settings.
Btw, any reason for you to use the GTK+ style? Or are you running kwrite/kate inside GNOME?
Actually I'm using MATE. But sorry about the noise, when I changed the font from Monospace to Monaco, everything started to work :) With dictionaries, I reinstalled aspell/ispell. But something seems wrong with both pt_BR and en_US dictionaries. I have no idea why. In Kate, the word: intentionallyf sometimes is marked right when using both dictionaries. The behavior seems very random. I'll try to figure out what is happening before opening another bug. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941887
http://bugzilla.opensuse.org/show_bug.cgi?id=941887#c10
--- Comment #10 from Wolfgang Bauer
Although I cannot reproduce it either, misspelled words are underlined in red here with the GTK+ style too. Maybe it depends on the actual GTK2 theme used (I tried with Breeze-GTK and oxygen-gtk), or the color scheme? Maybe try to change the color for spelling errors in the texteditor settings.
Actually it seems to be related to the font. If I use "Monospace" (which maps to "Liberation Mono" here), the red line is missing. When using the GTK+ style, the font is taken from the GTK settings too, not from KDE's font settings. So try to choose a different font either in the text editor settings or in the GTK settings. No idea whether it is a bug in ktexteditor then, or a problem with the "Liberation Mono" font... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941887
http://bugzilla.opensuse.org/show_bug.cgi?id=941887#c11
--- Comment #11 from Wolfgang Bauer
Actually I'm using MATE. But sorry about the noise, when I changed the font from Monospace to Monaco, everything started to work :)
D'oh. I just found out and wrote the same myself... ;-)
With dictionaries, I reinstalled aspell/ispell. But something seems wrong with both pt_BR and en_US dictionaries. I have no idea why.
Neither aspell not ispell are used. The openSUSE package is built with hunspell support only, and it uses the myspell dictionaries.
In Kate, the word:
intentionallyf
sometimes is marked right when using both dictionaries. The behavior seems very random. I'll try to figure out what is happening before opening another bug.
Please report this upstream at http://bugs.kde.org/. But it sounds a bit similar like this: https://bugs.kde.org/show_bug.cgi?id=340442 or https://bugs.kde.org/show_bug.cgi?id=339651 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941887
http://bugzilla.opensuse.org/show_bug.cgi?id=941887#c12
Wolfgang Bauer
participants (1)
-
bugzilla_noreply@novell.com