Go to the previous, next section.

Standard Locales

The only locale names you can count on finding on all operating systems are these three standard ones:

"C"
This is the standard C locale. The attributes and behavior it provides are specified in the ANSI C standard. When your program starts up, it initially uses this locale by default.

"POSIX"
This is the standard POSIX locale. Currently, it is an alias for the standard C locale.

""
The empty name says to select a locale based on environment variables. See section Categories of Activities that Locales Affect.

Defining and installing named locales is normally a responsibility of the system administrator at your site (or the person who installed the GNU C library). Some systems may allow users to create locales, but we don't discuss that here.

If your program needs to use something other than the `C' locale, it will be more portable if you use whatever locale the user specifies with the environment, rather than trying to specify some non-standard locale explicitly by name. Remember, different machines might have different sets of locales installed.

Go to the previous, next section.