use set_locale rather than locale
try to fix locale behavior