Hi Christoph,
I've just tested AuthKit 0.4 with an Arabic username and yes, there is a
problem because the browser encodes the Arabic as HTML entities because
there is no charset specified when the form is produced. Other than that
it all seems to work fine. Is it considered standard practice to allow
non-ascii usernames though? Particularly since usernames are supposed to
be case-insensitive in AuthKit?
I'm adding functionality now so that the default charset is UTF-8 and so
that you can arbitrarily set it but I suppose to be totally future proof
you should be able to add any status and headers you like to override
the defaults AuthKit uses. The thing is I'm not sure that isn't taking
things too far, after all, people can always implement their own middleware?
Cheers,
James
Christoph Haas wrote:
> Hi, list...
>
> I'm using AuthKit in my application and seem to have trouble when the
> login form gets me the username as a Unicode string. I use the famous
> line:
>
> form_username = request.params.get('username')
> request.environ['paste.auth_tkt.set_user'](form_username)
>
> This leads to Unicode errors (I currently cannot reproduce it). Things
> start to work though when I run str() on the Unicode string before:
>
> form_username = str(request.params.get('username'))
> request.environ['paste.auth_tkt.set_user'](form_username)
>
> Does AuthKit have trouble with Unicode strings in general? Or am I
> missing a configuration option?
>
> Kindly
> Christoph
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---