|
|
At any time, a C program has a current ``locale'' -- a collection of information that describes the conventions appropriate to some nationality, culture, and language. Locales have names that are strings and the only two standardized locale names are ``"C"'' and ``""''. Each program begins in the ``"C"'' locale which unsurprisingly causes all library functions to behave just like they have historically. The ``""'' locale is the implementation's best guess at the correct set of conventions appropriate to the program's invocation. (Of course ``"C"'' and ``""'' can cause identical behavior.) Other locales may be provided by implementations.
For the purposes of practicality and expediency, locales are partitioned into a set of categories. A program can change the complete locale (all categories) or one or more categories leaving the other categories unchanged. Generally each category affects a set of functions disjoint from the functions affected by other categories, so temporarily changing one category for a little while can make sense.