[Tutor] string.uppercase: too many for locale
Barnaby Scott
bds at waywood.co.uk
Thu Jan 11 00:34:17 CET 2007
Can anyone explain the following: I was getting string.uppercase
returning an unexpected number of characters, given that the Python Help
says that it should normally be A-Z. Being locale-dependent, I checked
that my locale was not set to something exotic, and sure enough it is
only what I expected - see below:
IDLE 1.1 ==== No Subprocess ====
>>> import locale, string
>>> locale.getlocale()
['English_United Kingdom', '1252']
>>> print string.uppercase
ABCDEFGHIJKLMNOPQRSTUVWXYZŠŒŽŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ
>>> print string.lowercase
abcdefghijklmnopqrstuvwxyzƒšœžßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ
>>>
What am I missing here? Surely for UK English, I really should just be
getting A-Z and a-z. In case it is relevant, the platform is Windows 2000.
Thanks
Barnaby Scott
More information about the Tutor
mailing list