Handles utf-8 templates