Fix localeEncoding.