From 7ba52c0b2b53a6013b8e31794a1991d641a6b0ab Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Thu, 13 Dec 2018 12:02:20 +0100 Subject: os/lang: use the correct LC_NUMERIC also for OS X --- src/nvim/os/lang.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nvim/os/lang.c') diff --git a/src/nvim/os/lang.c b/src/nvim/os/lang.c index 900cd1f53a..108a9c6c39 100644 --- a/src/nvim/os/lang.c +++ b/src/nvim/os/lang.c @@ -54,6 +54,11 @@ void lang_init(void) CFRelease(cf_lang_region); # ifdef HAVE_LOCALE_H setlocale(LC_ALL, ""); + +# ifdef LC_NUMERIC + // Make sure strtod() uses a decimal point, not a comma. + setlocale(LC_NUMERIC, "C"); +# endif # endif } #endif -- cgit