encode utf-8 to prevent ascii issues, catch unit test weirdness