<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Calc: incorrect formula text function result from Unicode's non-BMP characters. Functions LEN(), LEFT(), RIGHT(), MID(), SEARCH(), FIND(), REPLACE()"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=97198#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Calc: incorrect formula text function result from Unicode's non-BMP characters. Functions LEN(), LEFT(), RIGHT(), MID(), SEARCH(), FIND(), REPLACE()"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=97198">bug 97198</a>
from <span class="vcard"><a class="email" href="mailto:winfrieddonkers@libreoffice.org" title="Winfried Donkers <winfrieddonkers@libreoffice.org>"> <span class="fn">Winfried Donkers</span></a>
</span></b>
<pre>(In reply to Eike Rathke from <a href="show_bug.cgi?id=97198#c11">comment #11</a>)
<span class="quote">> As for the first attachment, these are real non-BMP characters. For this to
> work correctly the mentioned spreadsheet functions should operate on the
> actual Unicode characters code points instead of the 16-bit units. There's
> OUString::iterateCodePoints() to do that properly, a change in LO's string
> handling is not necessary.
>
> > As Excel 2016 has the same results as LO, interoperability would be affected
> > when LO is changed.
> Also the same result with the first attachment and real non-BMP characters?
> Anyway, I couldn't find a definition for Excel how they'd treat non-BMP
> characters, but as LEN() is supposed to return the length in *characters*,
> not in 16-bit code units, I propose to actually handle it that way. I
> consider treating these string functions in code units wrong. Specifically
> with LEFT() or RIGHT() or MID() or REPLACE() that should operate on
> characters, otherwise with code units could cut non-BMP characters in the
> middle.</span >
Thanks for your clarification, I will see if I can fix this.
(And I will document the Excel results in the unit test documents.)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>