Searching for a bug in my BANano library, I discovered a bug in the .toLowerCase() for the letter I in the Turkish language.
In the Turkish locale, the Unicode LATIN CAPITAL LETTER I becomes a LATIN SMALL LETTER DOTLESS I. That’s not a lowercase “i”.
To test:
Result:
returns False
Possible solution, being able to add a Locale:
Edit: the same goes for .toUpperCase()
Alwaysbusy
In the Turkish locale, the Unicode LATIN CAPITAL LETTER I becomes a LATIN SMALL LETTER DOTLESS I. That’s not a lowercase “i”.
To test:
B4X:
#VirtualMachineArgs: -Duser.language=tr
B4X:
Dim s As String = "IF"
If s.toLowerCase = "if" Then ' the s.toLowerCase returns ıf (no dot on the i)
Log("True")
Else
Log("False")
End If
Result:
returns False
Possible solution, being able to add a Locale:
B4X:
.toLowerCase2(Locale.ROOT)
Edit: the same goes for .toUpperCase()
Alwaysbusy
Last edited: