| Did you know ... | Search Documentation: |
| Locale and PL_initialise() |
PL_initialise()
reads the numeric conventions (decimal point, thousands separator, digit
grouping) of the environment's LC_NUMERIC locale for use by
locale-sensitive predicates such as format/3
with
:d and :f directives. See section
4.23. It does so without calling setlocale(), so the
embedder's process locale is left untouched and functions such as atof()
and
printf()("%f") continue to use the decimal point
that was in effect before PL_initialise()
was called.
PL_initialise()
does call setlocale() for LC_CTYPE (to pick up the
multibyte encoding used for atoms and streams),
LC_TIME and LC_COLLATE. Embedders that require
a strict "C" locale for these categories should either
arrange the environment before starting the process or reset the desired
categories after PL_initialise()
returns.