Re: Confusion with Unicode

75 views
Skip to first unread message

Ian Kelly

unread,
Nov 24, 2012, 2:34:03 PM11/24/12
to django-d...@googlegroups.com
On Sat, Nov 24, 2012 at 6:55 AM, Santiago Basulto
<santiago...@gmail.com> wrote:
> Hey guys, i'm posting this here because I posted this on django-users
> yesterday and didn't get any help.
>
> I'm kind of confused here...
>
> If I get data from a request, say:
>
> request.GET.get("something") or request.POST.get("something")
>
> Is that data automatically being encoded based on the Encoding of the
> request? Or I should take care of it explicitly?

The contents of a Django HttpRequest.GET or HttpRequest.POST are
automatically decoded to Unicode for you, using the encoding specified
in HttpRequest.encoding.

Russell Keith-Magee

unread,
Nov 24, 2012, 6:57:48 PM11/24/12
to django-d...@googlegroups.com
On Sat, Nov 24, 2012 at 9:55 PM, Santiago Basulto <santiago...@gmail.com> wrote:
Hey guys, i'm posting this here because I posted this on django-users yesterday and didn't get any help.

I realise someone has now answered your question -- but *please* don't use django-developers as "second tier" technical support. Django-dev is for discussing the development of Django itself, not for general usage queries. You should only be posting to django-dev if you want to get involved in the development of Django itself.

It's unfortunate that nobody answered your question on django-users, but this is a volunteer community -- sometimes that means you're not going to get a response. All I can suggest is that you wait, try rephrasing your question, or try another forum -- e.g. IRC.

Yours,
Russ Magee %-)

Santiago Basulto

unread,
Nov 27, 2012, 7:02:39 AM11/27/12
to django-d...@googlegroups.com
Russell: Sorry, you're right. I won't do it again. Do you want me to delete this post?

Ian. Thank you very much. I found what was causing my bug. I've got Ukranian users and for some reason the request.encoding value was not set, so I'll digg a little bit more.

Thanks guys. You rock.
Reply all
Reply to author
Forward
0 new messages