Bug 140935 - Misplace of underlining grammar error when using special chars
Summary: Misplace of underlining grammar error when using special chars
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-10 10:02 UTC by Pierre C
Modified: 2021-11-28 04:08 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Problem example (9.25 KB, application/vnd.oasis.opendocument.text)
2021-03-10 10:02 UTC, Pierre C
Details
screenshot (36.01 KB, image/jpeg)
2021-03-10 10:33 UTC, Olivier R.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre C 2021-03-10 10:02:31 UTC
Created attachment 170389 [details]
Problem example

See attached file

You can see a grammar error (use English language). 
There should be no space before question mark

But the underlining is misplaced and if you choose to correct this error (by right click), the question mark is added at the wrong place.

This is due to the fact that the text uses Mathematical chars from Libertinus Math
(A, V, v)

The problem is the same when using Cambria Math, or other specials glyphs
Comment 1 Olivier R. 2021-03-10 10:33:15 UTC
Created attachment 170390 [details]
screenshot
Comment 2 Olivier R. 2021-03-10 10:39:23 UTC
You have to activate grammar checker options in English to see the issue.

This is probably due to special characters length.
The grammar checker in Python works with text in UTF-8 and send back errors with their position according to the text in UTF-8.

If you replace 𝑉 with V, 𝐴 with A, 𝑣 with v, the second error is not misplaced.

See attached screenshot.
Comment 3 Pierre C 2021-03-10 14:48:40 UTC
The problem may be inherited from OpenOffice.
The attached document makes OO crash when right-clicking on the underlined error
Comment 4 Ivo Straka 2021-03-11 14:22:22 UTC
It would seem that if Unicode glyphs >= U+10000 are used, this bug occurs. U+FFFF and below do not trigger this problem.
Comment 5 Olivier R. 2021-03-11 14:31:21 UTC
(In reply to Ivo Straka from comment #4)
> It would seem that if Unicode glyphs >= U+10000 are used, this bug occurs.
> U+FFFF and below do not trigger this problem.

Yes.
Length of all all characters beyond U+10000 equals 2. That’s why all grammar checking errors are shifted to left each times one of these characters is present.
Comment 6 Xisco Faulí 2021-04-30 09:52:45 UTC
Thanks for reporting this issue.
Could you please paste the info from Help - about LibreOffice ?

I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' once the information has been provided
Comment 7 QA Administrators 2021-10-28 04:15:43 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2021-11-28 04:08:28 UTC
Dear Pierre C,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp