Apache OpenOffice (AOO) Bugzilla – Issue 73565
InStr function does not work properly with accentuated letters case
Last modified: 2017-05-20 10:44:22 UTC
Hello, Please consider this macro : Sub ExamplePosition Dim sInput As String Dim iPos as Integer sInput = "OpenOffice est GÉNIAL" iPos = Instr(sInput,"C") iPos = Instr(sInput,"g") iPos = Instr(sInput,"génial") print iPos End sub InStr doesn't consider 'É' as the equivalent of 'é' although the Compare variable is omited (considered as 1 i.e. 'not case sensitive'). This behaviour is noticeable with other accentuated letters. Regards, Erwan
i confirm this on Linux version too both OOo 2.1 and OOo 1.1.4 According on the online help, the returned value should not be 0
reassigning
STARTED, 2.x
ab: I consider this issue to be of minor importance compared to other issues, -> OOo 2.x
basic and scripting issues now should be assigned to component "scripting"
set target to 3.x according to http://wiki.services.openoffice.org/wiki/Target_3x
The Danish characters æ/Æ, ø/Ø and å/Å behaves similar. http://www.oooforum.dk/viewtopic.php?p=13299
*** Issue 126524 has been marked as a duplicate of this issue. ***
Easy workaround : convert to lower case before using InStr. Dim sInput As String Dim iPos as Integer sInput = "OpenOffice est GÉNIAL" iPos = Instr(LCase(sInput),"génial") print iPos
Reset the assignee to the default "issues@openoffice.apache.org".