« Contact | Home | Authenticating Using Email vs Username »
UnicodeDecodeError Exception Fix On Templates
By Paul Kenjora | May 14, 2008
My friend Brian at HelpMeSue.com has found a work around for the dreaded UnicodeDecodeError exception. Here is his fix…
In Brian’s Words…
Using special Spanish characters. Try to load a template with a render_to_response and get a template UnicodeDecodeError exception thrown.
To fix the issue:
- Run file on the template:
file static_page.htm
That produces: static_page.htm: ISO-8859 text, with very long lines, with CRLF line terminators - Convert the page to utf-8:
iconv -f ISO-8859-1 -t UTF-8 static_page.htm > new_static.htm
cp new_static_htm static_page.htm
file static_page.htm
That produces: static_page.htm: UTF-8 Unicode text, with very long lines, with CRLF line terminators
And now it all work so Brian’s Spanish template guru is Help Me Sue compatible.
More from Aware Labs
- Django Generic Relations Made Easier
- Installing Django on Gentoo The Hard Way
- Joost Meets Django
- WordPress Adventure – NoScript Hack Solved
- Constructive reasons to use Django instead of Rails (Proxied)
Aware Labs Recommends
- An Interview with Jacob Kaplan-Moss – Creator of Django (USwaretech)
- Why you should try Django : Agility (Dougal Matthews)
- Popularizing Django — Or Reusable apps considered harmful. (USwaretech)
Topics: Environment Setup, Tutorial | Comments
-
Brian
-
Pigletto
-
Brian
-
Brian
-
Jesse Legg
-
sean