tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: setlocale
dM> Are these two things - (a) that setlocale() has to be called for the
dM> environment to be recognized and (b) that "" is magic to make it
dM> pick up the environment - documented anywhere?
EF> man 3 setlocale.
dM> The string "environ" appears only three times in that page, none of
dM> which appear to be referring to the environment in the getenv() sense.
'the empty string "" which denotes the native environment'
This is probably a case where you read the right thing from the docs if you
know the answer anyway, but don't if you don't. Maybe you should propose a
re-phrase of that (plus the other missing bits) that you suppose would have
answered the question for you.
dM> Is there any documentation on what strings can be put in $LANG et al?
EF> man 7 nls.
dM> The closest I see there is
dM>
dM> The values of these environment variables contains a string format as:
dM>
dM> language[_territory][.codeset][@modifier]
dM>
dM> with a list of languages. Nothing gave any list of what territories
dM> are valid for a given language, or what codesets are supported, etc.
Ah, I thought the question was about the syntax (I read it in the context
of you wanting to create your own locale).
dM> ...plus /usr/src/share/locale. Now that I've discovered it.
Oh, I assumed anyone knew about that. Probably another candidate for adding
"see also" references.
Home |
Main Index |
Thread Index |
Old Index