From: Bram Moolenaar Date: Thu, 24 Sep 2020 21:08:19 +0000 (+0200) Subject: patch 8.2.1738: Mac: str2float() recognizes comma instead of decimal point X-Git-Tag: v8.2.1738 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=509f8031b2b347c033327ef33f3e5573a0595dbc;p=thirdparty%2Fvim.git patch 8.2.1738: Mac: str2float() recognizes comma instead of decimal point Problem: Mac: str2float() recognizes comma instead of decimal point. Solution: Set LC_NUMERIC to "C". (closes #7003) --- diff --git a/src/os_mac_conv.c b/src/os_mac_conv.c index 3daf74a48a..fd62124644 100644 --- a/src/os_mac_conv.c +++ b/src/os_mac_conv.c @@ -579,6 +579,10 @@ mac_lang_init(void) vim_setenv((char_u *)"LANG", (char_u *)buf); # ifdef HAVE_LOCALE_H setlocale(LC_ALL, ""); +# endif +# if defined(FEAT_FLOAT) && defined(LC_NUMERIC) + // Make sure strtod() uses a decimal point, not a comma. + setlocale(LC_NUMERIC, "C"); # endif } } diff --git a/src/version.c b/src/version.c index 24e30ff1d6..0b3c5f559d 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1738, /**/ 1737, /**/