Fixed read/write issue for certain locales.