At the C shell level, each environment variable can be set to locale (C
for ASCII, zh
for Simplified Chinese in EUC, zh.GBK
for Simplified Chinese in GBK or zh.UTF-8 for Simplified Chinese in Unicode) by a shell command
as follows:
C shell users can enter a shell command as follows:
system% setenv LC_TIME locale |
Bourne shell (sh) users can use set or export:
$ set -a LC_TIME $ LC_TIME=locale |
or
$ LC_TIME=locale $ export LC_TIME |
Making zh
or zh.GBK
the locale
allows the user's environment to display time in Simplified Chinese format
and text. A user can define a mix of locales for the working environment.
For example, characters can be typed and converted in Simplified Chinese,
time can be displayed in French format, and messages can appear in English.
Many users work in a single cultural environment. The LC_ALL
and LANG
environment
variables set the system default for all categories. For example, these C
shell commands set the system default for all categories to locale.
system% setenv LC_All locale system% setenv LANG locale |
System administrators or users can set the default and the setenv syntax can be used in programming.
This setting is put into effect the next time a setlocale() function call in an application program line sets a category to
the default setting: setlocale()(LC_
XXX ""
)