Fix SYS_ENCODING 

SYS_ENCODING should still be set if locale.setlocale fails (like it does on Windows, since "UTF-8" is not a valid setting there)