Calc byte position text functions

Eike Rathke erack at redhat.com
Wed Jul 5 10:04:30 UTC 2017


Hi Winfried,

On Tuesday, 2017-07-04 15:46:46 +0200, Winfried Donkers wrote:

> I have made REPLACEB and the results are identical with those for REPLACE,
> which I do not expect. Existing byte position text functions like LENB,
> LEFTB, RIGHTB also seem to produce the same results as LEN, LEFT and RIGHT.
> 
> I have constructed strings with CONCAT and some UNICHAR(value between 1000
> and 3000).
> 
> E.g. LENB( UNICHAR( 1048 ) ) returns 1 (I expected 2).

Note that the *B functions work differently only for characters for
which IsDBCS() in sc/source/core/tool/interpr1.cxx returns true, namely
CJK characters of the Unicode blocks listed in the scriptList array.
1048 is U+0418 "И" CYRILLIC CAPITAL LETTER I, which certainly is not
among them..

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Care about Free Software, support the FSFE https://fsfe.org/support/?erack
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20170705/09b7002f/attachment.sig>


More information about the LibreOffice mailing list