Henry Precheur ha scritto: > [...] >> How is authorization username handled in common WSGI frameworks? > > As far as I know, they don't handle this. They just return the string > without dealing with the encoding issues. > > I think there is no correct way of handling this, because 99% of > username/password contain only ascii characters. A possible 'workaround' > would be to limit yourself to the ascii charset. If you get a non-ascii > character raise an Exception. >
Right now I'm doing a: username.decode('us-ascii', 'replace') Regards Manlio _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com