Bug 116062 - Impossible to enter the chars U+0027 APOSTROPHE with French (Swiss) Keyboard
Summary: Impossible to enter the chars U+0027 APOSTROPHE with French (Swiss) Keyboard
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
Version:
(earliest affected)
6.0.2.1 release
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.1.0 target:6.0.3
Keywords: regression
: 116048 116330 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-02-27 14:23 UTC by Luc Rochat
Modified: 2019-11-17 18:31 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luc Rochat 2018-02-27 14:23:02 UTC
Description:
In all LibreOffice applications, when I type the corresponding keys, instead of U+0027, I get U+2039 or U+203A.
When in Tools -> Autocorrection -> Options, I uncheck "Single quotes : Replace", everything goes in order. But this is not the expected behavior.

Actual Results:  
‹›

Expected Results:
'


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:58.0) Gecko/20100101 Firefox/58.0
Comment 1 Laurent Balland 2018-02-27 15:18:19 UTC
Hi,
This regression was introduced by resolution of bug 105837 :
In Writer, automatic replacement of single quote was changed for *all* Swiss locales (de, fr, it) from U+2018 ‘ and U+2019 ’ to U+2039 ‹ and U+203A ›

French speakers use single quote ' as apostrophe (like in "Brian's dog") in many places in their text. Neither German nor Italian speakers seem to use it.
So Swiss French speaker can no more use this key with new default option.

I suggest to revert http://cgit.freedesktop.org/libreoffice/core/commit/?id=03d6a29d34e1c4e72ffa49ec3259eaf4059d9c60&h=libreoffice-6-0 only for fr-CH
Comment 2 Eike Rathke 2018-02-27 16:25:58 UTC
The replacement while typing can be undone with an immediate Ctrl+Z that leaves the unreplaced ' single quote (apostrophe) character. The change commit linked above states in it's comment the sources why the change was done. I think it is more common to expect the correct typographical quotes being inserted if quote replacement is enabled then to expect the apostrophe be preserved. Also note that previously the apostrophe wasn't kept either but replaced with a ’ U+2019 RIGHT SINGLE QUOTATION MARK instead (when typing Brian')

This is not a matter of locale data. To fix this properly, Writer (and EditEngine) would have to keep track of whether an opening quote character was used before and only then change to a closing quote.
Comment 3 Eike Rathke 2018-02-27 16:28:38 UTC
Another possibility for Writer|EditEngine to fix this would be to undo the replacement if a following character other than whitespace was typed.
Comment 4 Eike Rathke 2018-02-27 16:29:16 UTC
Or punctuation..
Comment 5 Luc Rochat 2018-02-27 16:38:19 UTC
The use of CTRL + Z is not possible because the use of the single quote is too frequent.
Comment 6 Laurent Balland 2018-02-27 16:48:34 UTC
@Eike: fr-CH users were used to get a round apostrophe U+2019 ’ when they use ' key in a middle of a word. It looks much nicer than a straight apostrophe.

This behavior is expected since the world is world (or almost) and brutal modification of such behavior with a minor version of LibO (6.0.1 => 6.0.2) is not correct for "normal" user. I propose to postpone this modification to 6.1 branch.

I think the problem is that we (French users in general) use ' key as either an apostrophe (which should always be U+2019) and a single quote which could be different according to locale. In French, apostrophe is much frequent than single quote.

So we would need 3 different replacements for ' key:
- single quote start: if there are letters only after quote
- single quote end: if there are letters only before
- apostrophe: of there are letters before and after

Except fr-CH, all fr-* are using same character U+2019 for single quote end and apostrophe. I don't know if some other locales use a different character for apostrophe and single quote end.
Comment 7 Eike Rathke 2018-02-27 17:25:54 UTC
(In reply to Laurent BP from comment #6)
> Except fr-CH, all fr-* are using same character U+2019 for single quote end
> and apostrophe. I don't know if some other locales use a different character
> for apostrophe and single quote end.

grep '<QuotationEnd>[^’]' i18npool/source/localedata/data/*.xml|wc -l
58

Anyway, the commit message mentioned above states why it is correct according to sources. I don't care much, if people think fr-CH should do it differently, well, I'll change it back.
Comment 8 Laurent Balland 2018-02-27 17:31:46 UTC
Thanks Eike. 
I agree that this behavior is in contradiction with the sources mentioned. But I think we should first handle the difference between apostrophe and single end quote, before modifying it.
Comment 9 Commit Notification 2018-02-27 17:39:57 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0808618e0df0fab4479917e588c096bc8770c6c5

Resolves: tdf#116062 revert [fr-CH] to use previous single quote characters

It will be available in 6.1.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 10 Eike Rathke 2018-02-27 17:42:33 UTC
Pending review
https://gerrit.libreoffice.org/50459 for 6-0
https://gerrit.libreoffice.org/50460 for 6-0-2
Comment 11 Commit Notification 2018-02-27 18:48:02 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b9910e87de4eea1cb3684bb7af8e58d681cbe809&h=libreoffice-6-0

Resolves: tdf#116062 revert [fr-CH] to use previous single quote characters

It will be available in 6.0.2.

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

Affected users are encouraged to test the fix and report feedback.
Comment 12 sophie 2018-02-28 10:48:12 UTC
*** Bug 116048 has been marked as a duplicate of this bug. ***
Comment 13 Eike Rathke 2018-02-28 11:25:19 UTC
Note: commit notification has a hickup, that commit was on 6-0 so for 6.0.3, the 6-0-2 one is still pending.
Comment 14 Eike Rathke 2018-02-28 11:32:51 UTC
There won't be 6.0.2.2 after 6.0.2.1 so it will be in 6.0.3
Comment 15 Adolfo Jayme Barrientos 2018-03-11 19:35:55 UTC
*** Bug 116330 has been marked as a duplicate of this bug. ***