Opened 5 years ago
Closed 5 years ago
#1485441 closed Bugs (fixed)
pspell support incorrectly highlights misspellings
| Reported by: | tensor | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.2-stable |
| Component: | PHP backend | Version: | 0.2-beta |
| Severity: | minor | Keywords: | |
| Cc: |
Description
There seems to be a problem when detecting new lines in text.
Also, sometimes words are highlighted at the wrong boundaries.
If you use non-ASCII (Russian) language to spell check highlighting becomes a comlete mess.
This may be due to byte based calculations in
program/steps/mail/spell_pspell.inc
Attachments (4)
Change History (19)
Changed 5 years ago by tensor
Changed 5 years ago by tensor
Changed 5 years ago by tensor
comment:1 Changed 5 years ago by hobstah
Changed 5 years ago by alec
comment:2 Changed 5 years ago by alec
Update to [d99b9356] (important) and try with attached pspell.patch
comment:3 Changed 5 years ago by tensor
Even with [d99b9356] and pspell.patch the rendering is exactly the same...
comment:4 follow-up: ↓ 6 Changed 5 years ago by alec
fix is for plain text compose (please, check in plain text). HTML needs fixes in tinymce.
comment:5 Changed 5 years ago by tensor
Yes, in text mode.
I additionally checked when UI language is set to English or Russian, it does not matter.
Alec, can you reproduce the bug on your side and verify the fix?
comment:6 in reply to: ↑ 4 ; follow-up: ↓ 7 Changed 5 years ago by hobstah
Replying to alec:
fix is for plain text compose (please, check in plain text). HTML needs fixes in tinymce.
Reporting: GOOD JOB! :)
Plain text compose is working like a charm.
If you use $len in $diff +=... calculation, its one less function call.
I suggest u put patch in dev tree. At least some UTF-8 languages are fixed.
comment:7 in reply to: ↑ 6 ; follow-up: ↓ 9 Changed 5 years ago by tensor
Replying to hobstah:
Replying to alec:
fix is for plain text compose (please, check in plain text). HTML needs fixes in tinymce.
Reporting: GOOD JOB! :)
For FF, yes all work OK, my bad in testing only in IE :)
In IE 7 new lines are collapsed and hyperlinks for mispelled words are shifted to the left for the number of collapsed new lines before them.
In Opera, new lines are preserved, but hyperlinks are also shifted to the left for the number of new lines before them.
comment:8 Changed 5 years ago by tensor
For this one, the first line is not collapsed, the rest are, both in Opera and IE 7
fff ffb dew welmfwe fmwe fkw fwem fmwel wepptn
For this sample, all lines are collapsed, both in Opera and IE 7
а луц оцул ацла цуад ацуойщ Лтйв Тлй ацуб, атцьл.
comment:9 in reply to: ↑ 7 ; follow-up: ↓ 13 Changed 5 years ago by hobstah
Replying to tensor:
Replying to hobstah:
Replying to alec:
fix is for plain text compose (please, check in plain text). HTML needs fixes in tinymce.
Reporting: GOOD JOB! :)
For FF, yes all work OK, my bad in testing only in IE :)
In IE 7 new lines are collapsed and hyperlinks for mispelled words are shifted to the left for the number of collapsed new lines before them.
Works for me IE7 and FF. Must be something else with your issue..
comment:10 Changed 5 years ago by alec
Confirmed problem with Opera, maybe we need googiespell.js library update.
comment:11 Changed 5 years ago by alec
My patch applied in [81308b30].
comment:12 Changed 5 years ago by alec
Checked with googiespell 4.0. Problem still exists, also googie's sample page works well, so it's roundcube issue.
comment:13 in reply to: ↑ 9 Changed 5 years ago by tensor
Replying to hobstah:
Works for me IE7 and FF. Must be something else with your issue.
What is your exact version of IE 7? Mine is 7.0.5730.13 on Windows XP SP3.
comment:14 Changed 5 years ago by tensor
When spellcheck_engine is set to 'googie' there are no problems with line collapsing and shifted hyperlinks in plain text editor.
comment:15 Changed 5 years ago by alec
- Resolution set to fixed
- Status changed from new to closed
Fixed in [b214f8d4].

I've tryed this in slovenian and noticed:
No problems with boundaries, when there are no UTF-8 characters.
When UTF-8 chars are in text, the position of words are wrong. If i add 2 UTF-8 characters, next misspelled word will have suggesion link 2 chars to the right.
Checking the code i suspect
However fixing that doesn't completely fix the issue. Probably wrong results on position from preg_split()... (UTF-8 again)