views:

55

answers:

1

When I do:

return render_to_response()

in Django. How do I set the content-type to UTF-8? So that everything displayed is UTF-8?

+3  A: 

hi,

django use UTF-8 as default encoding, but this can be modified with settings.DEFAULT_CHARSET.

Be sure, in your HTML template, to set UTF-8 for the HTML page also :

<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 
jujule