I’m building a simple hierarchical template with jinja.
I was splitting my monolithic html file in smaller chunks to reuse them.
In my html I had accented characters like èàù…
when I tried to run the app I received errors complaining about my files not beeing properly encoded.
So I decided to adhere to utf-8 standars and substituted those characters with things like ù
and so on…
This worked but is seems a bit cumbersome as a workflow.
I’m wandering which is the correct approach to this kind of problems both with template files and content that have to be rendered in those templates.
I suppose that it is good practice to encode texts in utf-8 before storing them but I’m not sure.
When you use utf-8 in your (html) files, templates and python code it works fine and you can use : èàù…
Make sure your editors use utf-8 encoded files are read this article about utf-8. : http://blog.notdot.net/2010/07/Getting-unicode-right-in-Python. You also can use :
at the start of your Python modules.