switch encoding to utf8 for template