Tuesday, May 7, 2013

Re: Django html input error

 
Why Django implicit converts to ascii my latin text ?
 
 
 

Em segunda-feira, 6 de maio de 2013 22h35min45s UTC-3, Rodolfo escreveu:
Hi,
 
I get an
"UnicodeEncodeError 'ascii' codec can't encode character '\xe3' in position 1: ordinal not in range(128)"
 
with the html fragment:

<input name="test" value="S&#227;o Paulo" type="submit">

To solve this problem, I changed the module "Python32\Lib\urllib\parse.py", line 80

_implicit_encoding =  'ascii'

to

_implicit_encoding =  'utf-8'

 

Is this the best solution?

 

Thank you

 

Rodolfo

Django version: 1.5a1
Python version: 3.2.3

 

 

 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate