Just call setlocale(LC_CTYPE, ""). This is the only way a correct
program should ever use setlocale.
NULL is not the same thing as "". Passing NULL as the second argument
to setlocale simply queries the current locale name. It does not setup
the locale.