dumbass locale question

Skip Montanaro skip at mojam.com
Thu Feb 17 18:00:40 CET 2000


I run a web site here in the US, but I get input from all over.  If I ask
for 

    "c".upper()

I get the appropriate response: "C".  However, if I ask for "é".upper(), I
don't get "É", I just get "é".

I don't have the luxury of assuming that my users come from one locale or
another.  I can assume for the most part that they are entering letters that
come pretty much from the Latin-1 character set.  To get "é".upper() to work
can I play some tom-foolery with the locale or must I craft my own upper()
and lower() functions?

Thx,

Skip Montanaro | http://www.mojam.com/
skip at mojam.com | http://www.musi-cal.com/
"Languages that change by catering to the tastes of non-users tend not to do
so well." - Doug Landauer




More information about the Python-list mailing list