In linux terminal one would type
locale charmap
in order to see what kind of character-encoding your system uses, eg UTF-8.
My question is how would you do this using c/c++. (I’m using linux)
edit: 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?
1 Answer