Hello,
need help with the following problem.
Why is É (201) between A (65) and Z (90)?
Local l as Logic
Local c as string
Local n as dword
n := Asc("É") <--201
n := Asc("A") <-- 65
n := Asc("Z") <-- 90
c := "É"
l := c >= "A" .and. c <= "Z" <-- is true
thank you
Thomas
Why is É between A and Z? (VO and X#)
Why is É between A and Z? (VO and X#)
Hi Thomas,
that depends on your nation module (if you are using a nation module) or your system.
The German nation module and/or a German language system should sort that between "E" and "F".
Wolfgang
that depends on your nation module (if you are using a nation module) or your system.
The German nation module and/or a German language system should sort that between "E" and "F".
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Why is É between A and Z? (VO and X#)
Hi Wolfgang,
thanks for the explanation.
I only want to allow the letters "A" to "Z". Do I have to check the Asc() values. Is that enough?
Or better look for a .Net-Method?
Thomas
thanks for the explanation.
I only want to allow the letters "A" to "Z". Do I have to check the Asc() values. Is that enough?
Or better look for a .Net-Method?
Thomas
Why is É between A and Z? (VO and X#)
Hi Thomas,
if you are using the VO runtime, you can use the ASC() function.
The Char:IsLetter() method returns true for every valild unicode character.
On your string you could use regular expressions:
Source: https://stackoverflow.com/questions/128 ... rom-a-to-z
Wolfgang
if you are using the VO runtime, you can use the ASC() function.
The Char:IsLetter() method returns true for every valild unicode character.
On your string you could use regular expressions:
Code: Select all
Regex.IsMatch(hello, @"^[a-zA-Z]+$")
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Why is É between A and Z? (VO and X#)
fine.
thank you Wolfgang
thank you Wolfgang