On Fri, 27 Jul 2007 05:42:12 -0700, Gilbert Fine wrote:

> I used django rev. 5559 for some time. After svn up today, I found
> CharField's cleaned_data is unicode. I think it is a good idea.
> Actually, I made this conversion in my source program.
> 
> The only question is how to specify encoding of the string sent from
> client browser? My users almost certainly using gb2312, not utf-8.

HTML4's description of the FORM element's 'accept-charset' attribute[0] 
states:

    The default value for this attribute is the reserved string 
    "UNKNOWN". User agents may interpret this value as the character 
    encoding that was used to transmit the document containing this FORM 
    element.

[0] http://www.w3.org/TR/html4/interact/forms.html#adef-accept-charset

So, you can try specifying that you want the submitted data to be encoded 
as utf-8 there, or you can serve the pages containing the FORM as utf-8 
and hope that the browser behaves sensibly and follows suite.

-- 
Sam Morris
http://robots.org.uk/

PGP key id 1024D/5EA01078
3412 EA18 1277 354B 991B  C869 B219 7FDB 5EA0 1078


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to