Fix for my local box

Since `locale.getpreferredencoding(do_setlocale=True)` was returning an empty string (no idea why).