Issue 73565 - InStr function does not work properly with accentuated letters case
Summary: InStr function does not work properly with accentuated letters case
Status: ACCEPTED
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows XP
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
: 126524 (view as issue list)
Depends on:
Blocks:
 
Reported: 2007-01-17 13:54 UTC by erwan.openoffice.org
Modified: 2017-05-20 10:44 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description erwan.openoffice.org 2007-01-17 13:54:32 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
Comment 1 maison.godard 2007-01-17 14:09:33 UTC
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
Comment 2 maison.godard 2007-01-17 14:10:46 UTC
reassigning
Comment 3 ab 2007-01-18 10:07:19 UTC
STARTED, 2.x
Comment 4 ab 2007-03-13 12:54:47 UTC
ab: I consider this issue to be of minor importance compared
to other issues, -> OOo 2.x
Comment 5 Mathias_Bauer 2007-12-04 14:57:26 UTC
basic and scripting issues now should be assigned to component "scripting"
Comment 6 Martin Hollmichel 2007-12-07 12:13:24 UTC
set target to 3.x according to http://wiki.services.openoffice.org/wiki/Target_3x
Comment 7 leiflodahl 2010-08-06 21:48:23 UTC
The Danish characters æ/Æ, ø/Ø and å/Å behaves similar.

http://www.oooforum.dk/viewtopic.php?p=13299
Comment 8 oooforum (fr) 2015-09-15 16:05:56 UTC
*** Issue 126524 has been marked as a duplicate of this issue. ***
Comment 9 bmarcelly 2015-09-20 07:05:03 UTC
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
Comment 10 Marcus 2017-05-20 10:44:22 UTC
Reset the assignee to the default "issues@openoffice.apache.org".