Mercurial > vim
comparison src/os_mac_conv.c @ 22379:e1e24b1dba6e v8.2.1738
patch 8.2.1738: Mac: str2float() recognizes comma instead of decimal point
Commit: https://github.com/vim/vim/commit/509f8031b2b347c033327ef33f3e5573a0595dbc
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 24 23:08:19 2020 +0200
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 https://github.com/vim/vim/issues/7003)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 24 Sep 2020 23:15:04 +0200 |
parents | 35921b7fc07a |
children | 68115baaf9e4 |
comparison
equal
deleted
inserted
replaced
22378:61c93dd752ad | 22379:e1e24b1dba6e |
---|---|
578 { | 578 { |
579 vim_setenv((char_u *)"LANG", (char_u *)buf); | 579 vim_setenv((char_u *)"LANG", (char_u *)buf); |
580 # ifdef HAVE_LOCALE_H | 580 # ifdef HAVE_LOCALE_H |
581 setlocale(LC_ALL, ""); | 581 setlocale(LC_ALL, ""); |
582 # endif | 582 # endif |
583 # if defined(FEAT_FLOAT) && defined(LC_NUMERIC) | |
584 // Make sure strtod() uses a decimal point, not a comma. | |
585 setlocale(LC_NUMERIC, "C"); | |
586 # endif | |
583 } | 587 } |
584 } | 588 } |
585 } | 589 } |
586 #endif // MACOS_CONVERT | 590 #endif // MACOS_CONVERT |