Bug 54409 - AutoCorrect not correcting word next to smart/curved quote-mark (single or double)
Summary: AutoCorrect not correcting word next to smart/curved quote-mark (single or do...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: László Németh
URL:
Whiteboard: target:6.5.0 target:6.4.0.2 target:6.3.5
Keywords:
: 93942 101851 (view as bug list)
Depends on:
Blocks: AutoCorrect-Complete Authors
  Show dependency treegraph
 
Reported: 2012-09-03 01:44 UTC by Tom Colley
Modified: 2019-12-30 00:44 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
v3.3.1 test (159.96 KB, image/png)
2018-09-06 13:10 UTC, Jordi
Details
v3.1.1 test (57.14 KB, image/png)
2018-09-07 11:25 UTC, Jordi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Colley 2012-09-03 01:44:25 UTC
Autocorrect operates illogically for text adjacent to quotes. Text that is specified for auto correction is sometimes not corrected when it is used next to quotation marks. The issue occurs differently depending on the type of inverted commas that are used, as shown in the examples below. To denote the use of the space bar, I've used the terminology [SPACE].

acn --> can

"acn[SPACE] --> "acn[SPACE] 

"acn" --> "acn"

"I acn" --> "I acn"

"I acn so" --> "I can so"

acn"[SPACE] --> acn"[SPACE]




'acn[SPACE] --> 'can[SPACE]

'acn' --> 'acn'

acn' --> acn'

acn' --> can'

acn'[SPACE] --> can'[SPACE]
Comment 1 Andrzej Hunt 2012-09-15 16:00:13 UTC
Reproduced in master on OpenSuse 12.2 / 32 bit, and in 3.5.6.2 on Windows Vista.
Comment 2 tommy27 2012-12-29 00:14:27 UTC
(In reply to comment #0)
> ....
> 
> 'acn' --> 'acn'
> 

this works for me using LibO 3.6.4 on Vista 64bit
'acn' --> 'can'

all other test look the same as described by you.
Comment 3 Kumāra 2013-08-24 03:25:55 UTC
I think this statement is simpler, clearer and more precise:
AutoCorrect does not replace word when next to a smart/curved quote mark (single or double).

In typing this (with the option to replace straight/dumb quote marks with smart/curved quote marks).
    “acn ‘acn “acn” ‘acn’
none of them gets replaced.

The replacements happens as expected though if the quote marks are straight/dumb.

Bug remains on 4.1.0.4.
Comment 4 QA Administrators 2015-04-01 14:41:11 UTC Comment hidden (obsolete)
Comment 5 Tom Colley 2015-04-02 00:28:23 UTC
This bug is still reproducible as per description in original report. There were no changes in the behaviour of the bug. I tested for the bug using LibreOffice 4.2.7.2 on Ubuntu 14.04LTS 64-bit.
Comment 6 Kumāra 2015-04-02 01:18:29 UTC
I'm correcting the Summary to reflect the issue more accurately, as explained in Comment 3.
Comment 7 Lynne Connolly 2015-08-20 20:10:18 UTC
It's still not working in LibreOffice Writer 5.0 - I tried writing a macro to correct the behaviour, but macros don't work properly either.
Comment 8 Buovjaga 2015-09-15 17:53:36 UTC
*** Bug 93942 has been marked as a duplicate of this bug. ***
Comment 9 Lynne Connolly 2016-05-20 10:14:44 UTC
Still inconsistent. I know why, but it doesn't matter, because in practice it makes capitalisation unusable. It's so annoying I started using another word processing program that does it correctly. The other program (Textmaker from Softmaker) does it to every sentence, so I have to change it when it's incorrect, but there are fewer of those, and it's something I can work with.
Writer does not capitalise a word when it is either inside curly quotes, or contains an apostrophe, or both.
Comment 10 Tom Colley 2016-05-27 00:08:21 UTC
It's 4 years since I first reported this bug. I solved the issue in my work practice by using an operating-system-wide autocorrect software. I chose Autokey for this purpose. I notice that this type of software provides two important functions which may render autocorrection in individual software redundant.

a) It allows text auto-correction across ALL software on that installation of ubuntu/linux. So the same autocorrection works on text editors, word processors, web browser forms, etc.
b) The personalised autocorrect data from one installation can be copied and/or synchronised with other installations, allowing one set of autocorrect data to be applied and updated across multiple computers. This data is also easily carried beyond the life of an installation, becoming part of a user's personal tools.

I suspect this will become (is becoming) the direction for the future. Given the lack of resources for autocorrect fixes in LibreOffice, perhaps the LO team might consider formalising dependence on such tools as Autokey, and invest some effort in their quality and integration with LO.

I notice that Autokey has its own bugs, which I work around by a simple quick restart. So it (and its equivalents) would benefit from such consolidation of resources.
Comment 11 tommy27 2016-10-09 16:45:40 UTC
*** Bug 101851 has been marked as a duplicate of this bug. ***
Comment 12 QA Administrators 2017-12-24 03:28:45 UTC Comment hidden (obsolete)
Comment 13 Lynne Connolly 2017-12-24 14:45:16 UTC
It's still very much there and it stops me using LibreOffice as my main WP program
Comment 14 Kumāra 2018-09-06 11:20:22 UTC
Does this affect only x86 Windows? I doubt so. My guess is it affects other machines and OSes too. Can someone confirm?

Also, is the earliest affected really "3.5 Daily"? Or should that be "Inherited from OOo"?
Comment 15 tommy27 2018-09-06 11:56:58 UTC
it affects Win7 x64 as well (tested with LibO 6.0.6.2 x64 build.

the bug culpruit are smart quotes (as pointed out in comment 3):

“acn  ‘acn “acn” ‘acn’  --> don't get corrected

workaround is to use normal quotes:

"acn  'acn "acn" 'acn'  --> get corrected


we need a Linux and/or Mac user to test.

I suspect this could be inherited from OOo but I don't have an OOo 3.3 release to test right now
Comment 16 Jordi 2018-09-06 13:10:45 UTC
Created attachment 144715 [details]
v3.3.1 test

Test of v3.3.1 on Devuan Linux x64
Comment 17 Tom Colley 2018-09-07 01:30:08 UTC
As requested recently by @tommy27 in Comment 15, I tested for the bug with a recent linux version of LibreOffice; Version 6.0.6.2 on Ubuntu 18.04LTS 64-bit. This bug is still reproducible as per description in original report.

I also compared the effect of turning smart quotes on and off (all words entered as acn, not can):

SMART/CURVED QUOTES TURNED OFF
can can "can "can" 'can 'can' can' 

SMART/CURVED QUOTES TURNED ON
can can “acn “acn” acn” ‘acn ‘acn’ acn’

To turn smart quotes on and off, see (for example) 
    Go to Tools > Autocorrect > Autocorrect Options > Localized Options Tab
    Check/uncheck the boxes next to Start Quote Replace and End Quote Replace. 

I'm guessing the fix for this bug involves updating underlying code for Autocorrection to take account of the additional unicode symbols associated with smart quotes. A list of these symbols can be found at https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
Comment 18 Kumāra 2018-09-07 03:00:42 UTC
With the recent comments, I think it's safe to say this affects all version. Changing hardware values to ALL.

Also, change version to 3.3.1, but my guess this is a bug since OOo.
Comment 19 Jordi 2018-09-07 11:25:32 UTC
Created attachment 144733 [details]
v3.1.1 test

Confirmed. Bug exists in Openoffice v3.1.1

Tested on Debian 7 32bit.
Comment 20 Commit Notification 2019-12-28 17:27:34 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0d52da4637b563c175cd21d04a639160441436ef

tdf#54409 fix AutoCorrect with Unicode quotation marks

It will be available in 6.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 21 Commit Notification 2019-12-29 11:48:13 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/30d5b303f0dd300e200c1316feeef4a0ba022b04

tdf#54409 fix AutoCorrect with Unicode quotation marks

It will be available in 6.4.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2019-12-30 00:44:37 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/d975364ad1f0ac576605a632517bc91b370ff514

tdf#54409 fix AutoCorrect with Unicode quotation marks

It will be available in 6.3.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.