Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug of the function Isupper() just FYI
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01246145
Message ID:
01246451
Views:
19
>Hi Naomi,
>
>>What should IsUpper and IsLower return if upper(letter) = letter = lower(letter)?
>
>It's a lower case letter for which there's no upper case corresponding character. ISLOWER() should return .T., ISUPPER() .F., that's what is happening in VFP.
>
>UPPER() and LOWER() only change the case of those characters that have a corresponding upper or lower case version. "ß" doen't have one, just like "!" or "9" doesn't have one. UPPER("ß9") therefore returns "ß9", as does LOWER("ß9").
>
>I think the root for this problem is the assumption that every letter has a lower case and an upper case version. That is, if ISALPHA() is true, UPPER() and LOWER() must differ. But that assumption is wrong, even in a Latin based language such as German. That's similar to the assumption that every letter must be a single character. Until recently Spanish had "CH" and "LL", two letters in the alphabet that consist of two characters.
>
>All this confusion and we only are talking about two language families that are the root of the English language: Romance and Germanic languages. <g>

Thanks a lot for your explanation, Christof. To conclude, the behavior is correct and not a bug.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform