This post originated from http://stackoverflow.com/questions/1492918/how-do-you-get-what-kind-of-encoding-your-system-uses-in-c-c
I tried using
nl_langinfo(CODESET)
but I got ANSI_X3.4-1968 instead of UTF-8 (which is what I get when typing: locale charmap). Am I using nl_langinfo() wrong? How should I use it?