UnicodeDecodeError Exception Fix On Templates
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
- When Django Apps Grow Up
- Constructive reasons to use Django instead of Rails (Proxied)
- WordPress Adventure – NoScript Hack Solved
- Django Deserializer Bug On Foreign Key When None
- Django Generic Relations Made Easier
Aware Labs Recommends
- Popularizing Django — Or Reusable apps considered harmful. (USwaretech)
- The Good News on Links: How to Generate More Unique Visitors (The Arkayne Blog)
- Why you should try Django : Agility (Dougal Matthews)
-
Brian
-
Pigletto
-
Brian
-
Brian
-
Jesse Legg
-
sean

![Recommend [AwareLabs]](http://s3.amazonaws.com/arkayne-media/img/badge/logo-recommend-badge-medium.png)