scope based setlocale(3)