This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients amaury.forgeotdarc, donmez, gvanrossum, loewis
Date 2007-12-20.15:05:34
SpamBayes Score 0.10695197
Marked as misclassified No
Message-id <1198163134.85.0.540513934647.issue1609@psf.upfronthosting.co.za>
In-reply-to
Content
Two easy ways to get the functionality using 8-bit strings, assuming
you've already set your locale properly:

(1) If your data is already an 8-bit string (i.e. isinstance(data,
str)), simply use data.upper() or data.lower()

(2) If your data is Unicode (i.e. isinstance(data, unicode)), convert to
8-bit using encode, apply upper/lower, and convert back to unicode. 
E.g. data.encode("Latin-1").upper().decode("Latin-1").  (I don't know
which encoding to use though -- So substitute whatever you have for
Latin-1, but don't use UTF-8.)

PS Martin: the 2.4/2.5 differences were caused by Cartman having hacked
his 2.4 installation to change the default encoding.
History
Date User Action Args
2007-12-20 15:05:34gvanrossumsetspambayes_score: 0.106952 -> 0.10695197
recipients: + gvanrossum, loewis, amaury.forgeotdarc, donmez
2007-12-20 15:05:34gvanrossumsetspambayes_score: 0.106952 -> 0.106952
messageid: <1198163134.85.0.540513934647.issue1609@psf.upfronthosting.co.za>
2007-12-20 15:05:34gvanrossumlinkissue1609 messages
2007-12-20 15:05:34gvanrossumcreate