fix encoding issues in base template (support espanol, etc)