Make sure program output use utf-8 encoding

Fixes formatting of output to terminal from --help and --version and similar options.