[Libreoffice-bugs] [Bug 142487] REPLACE: Wrong replacement in long text

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Jul 11 11:30:25 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=142487

--- Comment #7 from Mike Kaganski <mikekaganski at hotmail.com> ---
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?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210711/fdc59054/attachment.htm>


More information about the Libreoffice-bugs mailing list