Bug Hunting Session
Bug 88611 - LENB & co. wrong value for Cyrillic text
Summary: LENB & co. wrong value for Cyrillic text
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.5.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Function
  Show dependency treegraph
 
Reported: 2015-01-20 05:12 UTC by Urmas
Modified: 2019-03-21 11:25 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Urmas 2015-01-20 05:12:38 UTC
LENB("Проба") should return 10, as Cyrillic symbols are always 2-byte.
LO returns 5 even in FE locales.
Comment 1 raal 2015-01-20 08:14:34 UTC
LENB("Проба")  returns 5 in excel 2010

https://support.office.com/en-in/article/LEN-LENB-functions-6a149d3a-ba2e-4394-ad47-2eb083265a56
Important   LENB counts 2 bytes per character only when a DBCS language is set as the default language. Otherwise LENB behaves the same as LEN, counting 1 byte per character.
The languages that support DBCS include Japanese, Chinese (Simplified), Chinese (Traditional), and Korean. 

Your language is Russian or similar, I think..
Comment 2 Urmas 2015-01-20 11:19:53 UTC
The system locale was Simplified Chinese.
Comment 3 Buovjaga 2015-01-29 18:31:53 UTC
(In reply to Urmas from comment #2)
> The system locale was Simplified Chinese.

Returns 5 for me as well.

Win 7 Pro 64-bit Version: 4.5.0.0.alpha0+
Build ID: 784d069cc1d9f1d6e6a4e543a278376ab483d1eb
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2015-01-25_23:07:36
Comment 4 Eike Rathke 2015-01-29 18:58:10 UTC
A character is "double byte" only if the actual character is of some CJK script type Unicode block, which Cyrillic characters are not. Note that this is not related to whether the Unicode value is >= 256 or not, which probably lead to this confusion. These *B() string functions count 2 code points for characters of the older DBCS (Double Byte Character Sets) that were incorporated into the Unicode Standard.
Comment 5 Urmas 2015-01-29 19:14:09 UTC
Excel counts them as listed, LO should do the same.
Comment 6 Urmas 2015-01-29 19:34:09 UTC
Also, Cyrillic characters are considered CJK for Simplified Chinese, Japanese and Korean character sets.
Comment 7 Adolfo Jayme 2015-02-14 20:47:43 UTC
NOTABUG as per comment 4. “Excel does it” is not enough of a “rationale” to introduce a misbehavior.
Comment 8 Urmas 2015-02-14 21:05:34 UTC
Excel: "LENB returns the number of bytes used to represent the characters in a text string."
OpenDocument: "Returns the length of given text in units compatible with byte positions"

Cyrillic characters are 2-byte long in CJK locales and that should be reflected in the function behaviour.
Comment 9 QA Administrators 2016-02-21 08:35:21 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2017-03-06 15:13:34 UTC Comment hidden (obsolete)
Comment 11 Xisco Faulí 2017-06-26 18:46:34 UTC
This bug was never confirmed by a third person.
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 12 QA Administrators 2018-01-02 10:15:34 UTC Comment hidden (obsolete)
Comment 13 QA Administrators 2018-01-29 10:36:33 UTC Comment hidden (obsolete)
Comment 14 Xisco Faulí 2018-01-30 10:31:26 UTC
You can't confirm your own bugs. Moving it back to UNCONFIRMED until someone
else confirms it.
Comment 15 tommy27 2018-06-26 09:20:12 UTC
please retest with current LibO 6.0.5 release or 6.1.x or 6.2.x master builds and tell if this old issue which was reported in 2015 against LibO 4.5.x is still present.

let move this to NEEDINFO until user feedback is provided
Comment 16 QA Administrators 2019-01-11 15:22:14 UTC Comment hidden (obsolete)
Comment 17 QA Administrators 2019-03-21 11:25:46 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-20190321