[Web-SIG] WSGI for Python 3
Christoph Zwerschke
cito at online.de
Fri Aug 27 19:08:43 CEST 2010
Am 27.08.2010 18:27 schrieb P.J. Eby:
> At 06:05 PM 8/27/2010 +0200, Christoph Zwerschke wrote:
>> user = 'özkan'.encode('latin1')
>> if user = request.META.get('REMOTE_USER', b'').lower():
>>
>> will not work it the user has logged in as 'Özkan'.
>
> Isn't that a problem with code that does this now?
You mean in Python 2? If the locale is set properly, lower() will
account for non-ascii. I don't think Python 3 does this with bytes.
-- Christoph
More information about the Web-SIG
mailing list