Issue 126804 - AutoCorrect Doesn't Work with Zero-width Space
Summary: AutoCorrect Doesn't Work with Zero-width Space
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: 4.1.2
Hardware: All All
: P5 (lowest) Normal with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-22 06:15 UTC by sungkhum
Modified: 2016-04-26 20:48 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.2.0-dev
Developer Difficulty: ---


Attachments
English text with zero-width spaces and no autocorrect (116.07 KB, image/png)
2016-02-17 03:15 UTC, David Elliott
no flags Details
Picture showing right click autocorrect options (139.90 KB, image/png)
2016-02-17 03:16 UTC, David Elliott
no flags Details
Text after autocorrecting using right click (126.88 KB, image/png)
2016-02-17 03:16 UTC, David Elliott
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description sungkhum 2016-01-22 06:15:26 UTC
In languages such as Khmer (and Thai I believe), a zero-width space (U+200B) is used between words rather than a real space.
As such, the current code for AutoCorrect does not work with the Khmer language.

How to duplicate:
Add a replacement for the Khmer language (Tools -> AutoCorrect Options... - Replace tab: អោយ = ឲ្យ

Then type អោយ​ខ្ញុំ។ (with the zero-width space between អោយ​|ខ្ញុំ

Nothing happens.

Then type អោយ (and a real space after).

It auto-corrects to ឲ្យ

Desired result:
Type អោយ (with a zero-width space after).
It should auto-correct to ឲ្យ
Comment 1 keosophy21 2016-02-01 13:36:13 UTC
I faced this issue while typing khmer unicode
Comment 2 David Elliott 2016-02-17 03:13:28 UTC
When testing Autocorrect using zero-width spaces in English, the error seems to be the same. In the attached picture, the text shown is "Way wya|wya|wya way", where "|" is a zero-width space and every word shown was entered as "wya". Obviously the middle three "wya"s did not autocorrect, but of greater note is the fact that, although OO treats "wya|wya|wya" as a single word when autocorrecting while typing, it does NOT treat it as a single word when using right click -> [autocorrect options]. The inconsistency is explained below.

Steps to reproduce:
  1. In English (USA) with an empty document, type "wya wya" -> The normal autocorrect changes it to "Way way".
  2. Now type "wya|wya" (where "|" is zero-width space) -> Neither word autocorrects to "way".
  3. Right click on either one of the "wya"s in step 2 -> Only one word is highlighted and the "way" option is present. Click it and the word corrects properly, independent of the other beside it.

Note that this was reproduced on Windows using the Character Map tool and pasting in a zero-width space, not typing it directly.
Comment 3 David Elliott 2016-02-17 03:15:44 UTC
Created attachment 85295 [details]
English text with zero-width spaces and no autocorrect

Shows the issue reproduced in English.
Comment 4 David Elliott 2016-02-17 03:16:31 UTC
Created attachment 85296 [details]
Picture showing right click autocorrect options
Comment 5 David Elliott 2016-02-17 03:16:50 UTC
Created attachment 85297 [details]
Text after autocorrecting using right click
Comment 6 Theodore Matula 2016-04-26 20:48:37 UTC
Summary:I was also able to recreate this bug with the same tests and results as in comment #2. I copied and pasted his steps to reproduce below since I used the same exact steps.

Version: 4.2.0 AOO420m1(Build:9800)  -  Rev. 1692551

Specs:
OS: Windows 10 64-bit
Processor: Intel 17 2600k 3.4 Ghz
Graphics Card: Nvidia GTX 770 (2gb VRam)
RAM: 8 GB
Monitor: Asus 24" Monitor

Steps to reproduce:
1. Turn on autocorrect by clicking Format > Auto Correct > While Typing
2. In English (USA) with an empty document, type "wya wya" -> The normal autocorrect changes it to "Way way".
3. Now type "wya|wya" (where "|" is zero-width space) -> Neither word autocorrects to "way".
4. Right click on either one of the "wya"s in step 2 -> Only one word is highlighted and the "way" option is present. Click it and the word corrects properly, independent of the other beside it.