2

Subject says it all. Been looking for an answer, but cannot seem to find it.

I am writing a web app that will store data in a database and also have language files translated into a wide variety of character sets. At various moments, the text will be presented. I want to control presentation such as spurious blank spaces at the beginning and end of strings. Also I want to ensure some letters are upper or lower case.

My question is: what happens in upper/lower case functions when the character set only has one case?

EDIT Sub question: Are there any unexpected side effects to be aware of?

My guess is that you simply get back the one and only character.

EDIT - Added Description The main reason for asking this question is that I am writing a webapp that will be distributed and run on machines in remote areas with little or no chance to fix "on-the-spot" bugs. It's not a complicated webapp, but will run with many different language char sets. I want to be certain of my footing before releasing the server.

horace
  • 938
  • 9
  • 20

1 Answers1

2

First of all the upper() and lower() method in python can be applied to Hindi, Amharric and non-letter character sets.

For instance will the upper() method converts the lowercase characters if an equivalent uppercase of this char exists. If not, then not.

Or better said, if there is nothing to convert, it stays the same.

Ole Pannier
  • 3,208
  • 9
  • 22
  • 33
  • Pretty much what I was thinking. I have run limited tests on these font sets. So I have attempted to clarify my request in hopes of more detailed replies. Please have a look and let me know if you can further your answer. Thanks! – horace Dec 13 '22 at 00:12
  • To your further question. No there will be no side effects. Because it's like a binary operation. Either it can convert or not. If there is no exact equivalent it won't be converted. e.g. a question mark (?) won't be uppercase(), because there is no exact equivalent. Hope that clarifies as a whole answer. Cheers! – Ole Pannier Dec 13 '22 at 08:41