Created attachment 172338 [details] Extract the *.zip-file. Contains database an example text. Download the attached package. Contains a database-file and a text-file. Allow executing macros for this. Open the database. Open the form and have a look at the text. There are two positions marked in English with "→ have a look …" Same text you could see above. The macro should replace the "German" quotation marks. Now press the button. Quotation marks at the top of the text will be removed right. Quotation marks at the bottom will be removed wrong. There will be removed the following characters instead of the quotation marks. This bug appears here with LO 7.0.5.2, also with LO 7.1.3.2. It won't appear with LO 6.4.7.2 on the same machine. Tested with OpenSUSE 15.2 64bit rpm Linux.
I can confirm this misbehavior using LibreOffice Version: 7.0.5.2 Build ID: 64390860c6cd0aca4beafafcfd84613dd9dfb63a CPU threads: 16; OS: Linux 5.10; UI render: default; VCL: kf5 Locale: de-DE (de_DE.UTF-8); UI: de-DE Calc: threaded on Manjaro Linux, Kernel Version: 5.10.36-2-MANJARO KDE Plasma Version: 5.21.5 KDE Frameworks Version: 5.82.0 Qt Version: 5.15.2
This bug is connected with version 7: It occurs with version 7.0.5.2, as I described above. It does NOT occur with Version: 6.4.7.2 Build-ID: 639b8ac485750d5696d7590a72ef1b496725cfb5 CPU-Threads: 16; BS: Linux 5.10; UI-Render: Standard; VCL: kf5; Gebietsschema: de-DE (de_DE.UTF-8); UI-Sprache: de-DE Calc: threaded It is important to fix this, otherwise BASE users will not be able to use version 7.x or face data loss.
Bibisected to the following commit using repo bibisect-linux-64-7.0. Adding CC: to Andreas Heinisch. https://cgit.freedesktop.org/libreoffice/core/commit/?id=3ff159d35770ac3454ee909b348cb4f4ca8b0b9b author Andreas Heinisch <andreas.heinisch@yahoo.de> 2020-05-20 15:49:08 +0200 committer Noel Grandin <noel.grandin@collabora.co.uk> 2020-05-21 08:50:23 +0200 tdf#132389 - case-insensitive operation for non-ASCII characters
The bibisected bug was fixed in: https://bugs.documentfoundation.org/show_bug.cgi?id=141045
(In reply to Andreas Heinisch from comment #4) > The bibisected bug was fixed in: > https://bugs.documentfoundation.org/show_bug.cgi?id=141045 But this buggy behavior still exists in LO 7.1.5.1 on OpenSUSE 15.2. Bug 141045 has been fixed for LO 7.1.2.
However, the error lies in this fix. Sry Mike for the noise, but could this be some kind of Unicode problem? Since the aExpStr and the aSrcStr have the same length at the beginning. After the toUpper-replacement they differ, hence this error. Is there a way to ensure they have the same length and characters even after the toUpper?
So basically, the minimal reproducer is: Sub ReplaceGermanQuotes Dim s$ s = "Replace something after the 'ß': x y" s = Replace(s, "x", "y") MsgBox s End Sub Indeed, 'ß' is uppercased to a two-character 'SS'. The correct way is shown in TextSearch::searchForward in i18npool/source/search/textsearch.cxx. It creates an array of matches from original character positions to the transliterated character positions. Possibly we could reuse utl::TextSearch::SearchForward from unotools/source/i18n/textsearch.cxx?
I will test if the InStr function is affected as well (In Bug 139840)
(In reply to Mike Kaganski from comment #7) > So basically, the minimal reproducer is: > > Sub ReplaceGermanQuotes > Dim s$ > s = "Replace something after the 'ß': x y" > s = Replace(s, "x", "y") > MsgBox s > End Sub > > Indeed, 'ß' is uppercased to a two-character 'SS'. … but there is no 'ß' in the long text of the example. The effect indeed is the same.
(In reply to Robert Großkopf from comment #9) > … but there is no 'ß' in the long text of the example. The effect indeed is > the same. There is: "eines großen Sprachozeans"
(In reply to Aron Budea from comment #10) > (In reply to Robert Großkopf from comment #9) > > … but there is no 'ß' in the long text of the example. The effect indeed is > > the same. > There is: "eines großen Sprachozeans" You are right! And when I set this to 'ss' instead of 'ß' it will work.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/7e5c9220ef5d51ac23e618c5c9eeda9cf4339c88 tdf#142487 - use utl::TextSearch in order to implement the replace algorithm It will be available in 7.3.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.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/15e4d775f7c2edbafca04ade1d293ce71045e9e7 tdf#142487 - use utl::TextSearch in order to implement the replace algorithm It will be available in 7.2.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.
Sigh ... this broke the fix for bug 132388 :-)
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a03b7d2a8d0f0fd7e710202bbeecf165f0fcd06a tdf#132388: reimplement fix for tdf#142487 It will be available in 7.4.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.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-7-3": https://git.libreoffice.org/core/commit/8efa3dd53aaf98ed258c9f340800504c9e874b78 tdf#132388: reimplement fix for tdf#142487 It will be available in 7.3.1. 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.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/3fa7c7618500bf5914e19cb3714f301f7bff305a tdf#132388: reimplement fix for tdf#142487 It will be available in 7.2.6. 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.