templater.py fixed encoding