Bug 138258 - Not all apostrophe marks work in search
Summary: Not all apostrophe marks work in search
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha1+
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: László Németh
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-16 13:21 UTC by xordevoreaux
Modified: 2021-04-16 07:06 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
quote example (2.48 KB, image/png)
2020-11-16 13:21 UTC, xordevoreaux
Details
Example file with single and double apostrophes and their typographic versions (9.39 KB, application/vnd.oasis.opendocument.text)
2021-04-16 06:53 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xordevoreaux 2020-11-16 13:21:21 UTC
Description:
Recent fix 117643 only addressed half the problem of apostrophes not working when performing a search. Only the trailing single quote was coded for, not both apostrophes.

example:  John said, "you know he meant 'go away' when he said 'hi'."


Steps to Reproduce:
1. Open Writer
2. Type 'hi'
3. Attempt to search for it

Actual Results:
Not found

Expected Results:
Should be found


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.alpha1+ (x64)
Build ID: 42a691933429dbb315de2bd7ba2724993c60411f
CPU threads: 8; OS: Windows 10.0 Build 20257; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 1 xordevoreaux 2020-11-16 13:21:51 UTC
Created attachment 167332 [details]
quote example

O'clock is found, 'hi' is not.
Comment 2 xordevoreaux 2020-11-18 22:27:04 UTC
Not working in

Version: 7.1.0.0.alpha1+ (x64)
Build ID: ccd0e5f445d4a7d0e7aca6c23c02c61bf14510b2
CPU threads: 8; OS: Windows 10.0 Build 20257; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Will wait for another daily build.
Comment 3 xordevoreaux 2020-11-23 16:54:30 UTC
Still a problem under 7.2.0.0 alpha 0

Version: 7.2.0.0.alpha0+ (x64)
Build ID: f313e27fb7f2d42247407e26e16f264e30f87ca5
CPU threads: 8; OS: Windows 10.0 Build 20262; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 4 xordevoreaux 2020-12-04 13:31:34 UTC
Still a problem with the trailing quote in

Version: 7.2.0.0.alpha0+ (x64)
Build ID: 561e5559bb68242c7f785f0ca3bee3eb12b58963
CPU threads: 8; OS: Windows 10.0 Build 20270; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 5 Xisco Faulí 2020-12-07 16:46:54 UTC
I can't reproduce it in

Version: 7.2.0.0.alpha0+
Build ID: 84af20ef3ea72190784e9e7be820684c2558ba8c
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 6 Xisco Faulí 2020-12-07 16:48:54 UTC
Thank you for reporting the bug. To be certain the reported issue is not related to corruption in the user profile, could you please reset your Libreoffice profile ( https://wiki.documentfoundation.org/UserProfile ) and re-test?

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the issue is still present
Comment 7 xordevoreaux 2020-12-07 19:10:32 UTC
(In reply to Xisco Faulí from comment #6)
> Thank you for reporting the bug. To be certain the reported issue is not
> related to corruption in the user profile, could you please reset your
> Libreoffice profile ( https://wiki.documentfoundation.org/UserProfile ) and
> re-test?
> 
> I have set the bug's status to 'NEEDINFO'. Please change it back to
> 'UNCONFIRMED' if the issue is still present

I will, but have you tried reproducing the bug in the environment that the bug was identified? You tested in Linux, I'm on Windows. They're not 1:1 in terms of bugs.
Comment 8 xordevoreaux 2020-12-07 19:14:17 UTC
(In reply to Xisco Faulí from comment #6)
> Thank you for reporting the bug. To be certain the reported issue is not
> related to corruption in the user profile, could you please reset your
> Libreoffice profile ( https://wiki.documentfoundation.org/UserProfile ) and
> re-test?
> 
> I have set the bug's status to 'NEEDINFO'. Please change it back to
> 'UNCONFIRMED' if the issue is still present

In WINDOWS, this bug still happens on a brand new profile.

Search finds:
 can't 

Does not find:
'hi'   as if searching for a partial quote embedded in a sentence.
Comment 9 Justin L 2020-12-24 16:33:47 UTC
Like most word processors, LibreOffice by default turns on smart quotes, so it CHANGES a u+0027 straight single quote into an open or close quote.

If you copy the 'hi' from the text and paste it into the search, it will find it.

It is actually rather DANGEROUS to do what bug 117643 did and have a search for the straight quote match a smart quote.  What if I wanted to find all the instances where a straight quote was used instead of a smart quote? I wouldn't be able to do it. So search really ought to find ONLY exactly what the user entered.

I would resolve this as WONTFIX, and I would flag commit	d40f2d02df26e216f367b5da3f9546b73f250469 as a regression (although there is "regular expression" that "fixes" that - which also isn't intuitive to the average user).
Comment 10 xordevoreaux 2020-12-24 20:06:53 UTC
Unfortunate. MS Word will search either quote format seamlessly without a pitchfork rebellion from its user base that such happens, and I'd expect any other word processor to accomplish the same.
Comment 11 NISZ LibreOffice Team 2021-04-16 06:53:07 UTC
Created attachment 171232 [details]
Example file with single and double apostrophes and their typographic versions

Can't reproduce this in 7.1, since:

https://git.libreoffice.org/core/+/d40f2d02df26e216f367b5da3f9546b73f250469

author	László Németh <nemeth@numbertext.org>	Thu Nov 12 11:33:05 2020 +0100
committer	László Németh <nemeth@numbertext.org>	Fri Nov 13 16:06:25 2020 +0100

tdf#117643 Writer: fix apostrophe search regression

During text search, ASCII apostrophe ' (U+0027)
of the search term matches the typographic
apostrophe ’ (U+2019) of the text, too.

Now 'hi' matches:
'hi'
’hi’

o' matches in:
six o’clock
seven o'clock

and "You know" matches
"You know" but NOT „You know”

as seen in this attached file.

Maybe we could focus this bug on the latter.

My Word 2019 matches both apostrophes if the "Use wildcards" option (see: https://cybertext.wordpress.com/2012/01/05/word-find-and-replace-multiple-spaces-before-a-number/) is not checked (by default).
Checking this box is not much more unintuitive than checking "Regular expression" in Writer to have only the literal ' or " match.

So for UX compatibility (as asked by OP) it would be nice to have "You know" to match "You know" AND „You know”.