Fix for using unicode characters only instead of ascii default

Currently this does not work since it fallsback to using `ascii` for encoding.