Alex Khroustalev
c) How does RC_LC_NUMERIC option works? I.e. on my system OOo thinks that the decimal separator is comma, when there is a point it assumes it is a date and I want to change this behaviour.
mfabian@magellan:~$ LC_NUMERIC=de_DE.UTF-8 /usr/bin/printf "%f\n" 5
5,000000
mfabian@magellan:~$ LC_NUMERIC=de_DE.UTF-8 /usr/bin/printf "%f\n" 5
5,000000
mfabian@magellan:~$ LC_NUMERIC=ru_RU.UTF-8 /usr/bin/printf "%f\n" 5
5,000000
mfabian@magellan:~$ LC_NUMERIC=ru_RU.KOI8-R /usr/bin/printf "%f\n" 5
5,000000
mfabian@magellan:~$ LC_NUMERIC=en_GB.UTF-8 /usr/bin/printf "%f\n" 5
5.000000
mfabian@magellan:~$ LC_NUMERIC=POSIX /usr/bin/printf "%f\n" 5
5.000000
mfabian@magellan:~$
I.e. you should set LC_NUMERIC to a locale which uses the point as the
decimal separator.
But take care not to mix different encodings in different LC_*
variables. If you use LANG=ru_RU.KOI8-R, you should *not*
use LC_NUMERIC=en_GB.UTF-8 or LC_NUMERIC=en_GB because the behaviour
is undefined according to the ``The Open Group Base Specifications
Issue 6'', see also
http://www.suse.de/~mfabian/suse-cjk/locales-examples.html
Using LC_NUMERIC=POSIX together with LANG=ru_RU.KOI8-R most likely
works because the POSIX locale used ASCII encoding
mfabian@magellan:~$ LC_CTYPE=POSIX locale charmap
ANSI_X3.4-1968
mfabian@magellan:~$
which is compatible with most other encodings.
But if you interpret the above mentioned specification literally, the
behaviour is still undefined ...
A good solution is to switch to UTF-8 and use
LANG=ru_RU.UTF-8
LC_NUMERIC=en_GB.UTF-8
--
Mike FABIAN