I have a problem with rending mako templates to which I have passed some Unicode values . I get a following error:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 13: ordinal not in range(128)
Problem is solved with the following line of code:
${unicode(m, 'latin-1')}
in mako template every time i want to display said values. Solution in itself is not very elegant and it gets tiresome using it every time.
Is there a way to set latin-1 as a default codec instead of ascii for mako templates from inside the pyramid?