Appendices > Internationalization in Rogue Wave Server > Locale Requirements > Current Default Locale
 
Current Default Locale
Your system will have a default locale. Normally, your default locale should be set to the language you want to use. To find out the current default locale on your system, you can run one of the following programs:
On Unix Systems
#include <locale.h>
#include <stdio.h>
#include <langinfo.h>
 
int main()
{
char* loc = setlocale(LC_ALL, "");
if (loc) {
printf("default locale: %s\n",loc);
printf("encoding %s\n", nl_langinfo(CODESET));
} else
printf("System does not support this locale\n");
return 0;
}
If your system is set to the French language, here is an example of what you will get on HP‑UX 10.x:
default locale: fr_FR.iso88591
On Solaris 10, you will get:
default locale: fr
On Windows Systems
#include <locale.h>
#include <stdio.h>
#include <windows.h>
 
int main()
{
printf("default locale: %s\n",setlocale(LC_ALL, ""));
printf("encoding %d\n", GetACP());
return 0;
}
On Windows®, you will get:
default locale: French_France.1252

Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.