https://bugs.documentfoundation.org/show_bug.cgi?id=160278
--- Comment #3 from Adomas VenΔkauskas <[email protected]> --- Sorry if this wasn't entirely clear. Say the contents of my Writer document are "Text[range]" where the text in bracket is a range. Then ``` public void String test(XTextRange range) throws Exception { range.setString("π"); return range.getString(); } ``` Will produce a String with content "tπ". We have a big plugin codebase and I was debugging this in-code with a debugger, so I have not actually tested this as an isolated piece of code, but it should work, although I'm not sure if Java accepts a Unicode string literal like that. Our actual problem is that we replace a range with some text from the user's Zotero library and then set a HyperLinkURL on the range. Our user reported an issue where this operation sets the link on the range plus some characters before the replaced range, and I nailed it down to the "π" character causing the issue. Shorter unicode characters like latin diacritics (Δ , Δ, Δ, etc.) do not produce the issue. I assume the issue is precisely caused because Java will report this character as a String of length 2, when in LibreOffice it may be treated as length 1, and the range should be of length 1 too, but I have not investigated it further and wouldn't know where in the interface between Java and LibreOffice things go wrong. If you want me to look into this some more or produce a better test case I can, but fundamentally I think someone able to fix this will be better equipped to know what to look for and where. -- You are receiving this mail because: You are the assignee for the bug.
