mirror of
https://github.com/curl/curl.git
synced 2026-07-23 15:37:16 +03:00
tool_operate: override the numeric locale and set "C" by force
Makes curl always use dot as decimal separator for options, independently of what the locale says. Makes scripts and command lines portable. Updated docs accordingly. Reported-by: Daniel Faust Fixes #9969 Closes #9972
This commit is contained in:
parent
cde8f28489
commit
975efec61b
4 changed files with 11 additions and 1 deletions
|
|
@ -2638,9 +2638,10 @@ CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[])
|
|||
CURLcode result = CURLE_OK;
|
||||
char *first_arg = argc > 1 ? curlx_convert_tchar_to_UTF8(argv[1]) : NULL;
|
||||
|
||||
/* Setup proper locale from environment */
|
||||
#ifdef HAVE_SETLOCALE
|
||||
/* Override locale for number parsing (only) */
|
||||
setlocale(LC_ALL, "");
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
#endif
|
||||
|
||||
/* Parse .curlrc if necessary */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue