On 2021-05-18, 19:31 +0700, Maxim Nikulin <maniku...@gmail.com> wrote:
> The question may be risen in emacs-devel but I am unsure if I will > participate in discussion. Why? >> Can you test this function: >> >> (defun org-table--comma-as-decimal-sep () >> "Return nil or 2 if separator is dot or comma respectively." >> (string-search "," (format "%f" 10))) > > No, it does not work. `format' always uses dot. It is reasonable when > e.g. during writing a config file or during data exchange when locales > must be ignored. > > I was too optimistic. I did not expect that support of locales are so > poor in Emcacs. I do not see any traces of localeconv(3) in sources that > would allow to get value of decimal_point directly. > > Numbers are forced to use "C" locale and I have not noticed any way to > override it. Initial settings: > > http://git.savannah.gnu.org/cgit/emacs.git/tree/src/emacs.c#n1490 > > http://git.savannah.gnu.org/cgit/emacs.git/tree/src/emacs.c#n2861 > > setlocale (LC_NUMERIC, "C"); > Hmm, so this means that Elisp cannot read something like this '10,1' as floating point number. >> To test I am using: $ LANG=de_DE.UTF-8 emacs -Q >> >> But I am getting this as warning: >> (process:1787): Gtk-WARNING **: 15:40:49.375: Locale not supported by C >> library. >> Using the fallback 'C' locale. > > You get this error due to you have not generated this locale. On debian > & ubuntu > > dpkg-reconfigure locales > > allows to select desired locales and performs all necessary actions. Thanks! I have fixed it now. -- Utkarsh Singh http://utkarshsingh.xyz