Bug 139840 - Error in Basic Instr function in case of case insensitive search
Summary: Error in Basic Instr function in case of case insensitive search
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-22 17:52 UTC by Vladimir Sokolinskiy
Modified: 2021-02-07 04:20 UTC (History)
1 user (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 Vladimir Sokolinskiy 2021-01-22 17:52:31 UTC
Description:
Error in Basic Instr function in case of case insensitive search with non-Latin letters.

Steps to Reproduce:
Run macro:

Sub TestInstrFunction()
  MsgBox Instr(1, "α", "Α", 1)
End Sub




Actual Results:
Result is 0.

Expected Results:
Must be 1. Arguments - Greek letter alpha (uppercase and lowercase).

There is no error with Latin letters.


Reproducible: Always


User Profile Reset: No



Additional Info:
-
Comment 2 Vladimir Sokolinskiy 2021-02-06 16:47:02 UTC
Yes, the toAsciiUpperCase and toAsciiLowerCase functions MUST NOT be used when processing texts containing Unicode characters with codes>= U+0080.