python - Django html input UnicodeEncodeError -


my django version 1.5a1 , python version: 3.2.3

i an

unicodeencodeerror 'ascii' codec can't encode character '\xe3' in position 1: ordinal not in range(128) 

with html fragment:

<input name="test" value="s&#227;o paulo" type="submit" /> 

my html:

<!doctype html public "-//w3c//dtd html 4.01//en" "http://www.w3.org/tr/html4/strict.dtd"> <meta content="text/html; charset=utf-8" http-equiv="content-type"> 

i can't find why django converts html input ascii before creating instance of django.http.httprequest , giving python view.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

What is the difference between data design and data model(ERD) -

ios - Can NSManagedObject conform to NSCoding -