Re: Unicode Keys

2007-07-12 Thread Malcolm Tredinnick
On Thu, 2007-07-12 at 20:08 -0500, Jeremy Dunck wrote: > On 7/12/07, Collin Grady <[EMAIL PROTECTED]> wrote: > > For instance, if I have an input with name="語" and request.POST > > doesn't support unicode, how do I then get the value for that? :) > > I believe the issue is that *names* for kwargs

Re: Unicode Keys

2007-07-12 Thread Jeremy Dunck
On 7/12/07, Collin Grady <[EMAIL PROTECTED]> wrote: > For instance, if I have an input with name="語" and request.POST > doesn't support unicode, how do I then get the value for that? :) I believe the issue is that *names* for kwargs can not be unicode. In [1]: u='語'.decode('utf-8') In [2]: {u:1

Re: Unicode Keys

2007-07-12 Thread Collin Grady
Passing raw GET params into a function seems like a recipe for disaster if you fail to validate something properly. Plus, unicode is allowed to be used as get/post keys, so not supporting it in the dict keys would cause problems. For instance, if I have an input with name="語" and request.POST do

Re: Unicode Keys

2007-07-12 Thread David Cramer
Ya it's probably not a great practice. I argued about these should be str's for an hour yesterday and I was convinced to drop it :) Gábor Farkas wrote: > David Cramer wrote: > > Is there any reason why its storing the keys in QueryDict (possibly > > others) as unicode? > > > > i think it's for con

Re: Unicode Keys

2007-07-11 Thread Gábor Farkas
David Cramer wrote: > Is there any reason why its storing the keys in QueryDict (possibly > others) as unicode? > i think it's for consistency. i mean, when i see mentioned that django is fully unicode, i assume every string i get from django is in unicode, unless there's a very good reason for