Made template text encoding a config item.

The default value is 'iso-8859-1' (also known as 'latin-1') which is
what the example templates use, although 'utf-8' would have been a
better choice.