updated to use Utf8 encoding instead of the system default