@@ -499,7 +499,35 @@ Strings and formatting
499499
500500- Use `ParseInt32`, `ParseInt64`, `ParseUInt32`, `ParseUInt64`, `ParseDouble` from `utilstrencodings.h` for number parsing
501501
502- - *Rationale*: These functions do overflow checking, and avoid pesky locale issues
502+ - *Rationale*: These functions do overflow checking, and avoid pesky locale issues.
503+
504+ - Avoid using locale dependent functions if possible. You can use the provided
505+ [`lint-locale-dependence.sh`](/contrib/devtools/lint-locale-dependence.sh)
506+ to check for accidental use of locale dependent functions.
507+
508+ - *Rationale*: Unnecessary locale dependence can cause bugs that are very tricky to isolate and fix.
509+
510+ - These functions are known to be locale dependent:
511+ `alphasort`, `asctime`, `asprintf`, `atof`, `atoi`, `atol`, `atoll`, `atoq`,
512+ `btowc`, `ctime`, `dprintf`, `fgetwc`, `fgetws`, `fprintf`, `fputwc`,
513+ `fputws`, `fscanf`, `fwprintf`, `getdate`, `getwc`, `getwchar`, `isalnum`,
514+ `isalpha`, `isblank`, `iscntrl`, `isdigit`, `isgraph`, `islower`, `isprint`,
515+ `ispunct`, `isspace`, `isupper`, `iswalnum`, `iswalpha`, `iswblank`,
516+ `iswcntrl`, `iswctype`, `iswdigit`, `iswgraph`, `iswlower`, `iswprint`,
517+ `iswpunct`, `iswspace`, `iswupper`, `iswxdigit`, `isxdigit`, `mblen`,
518+ `mbrlen`, `mbrtowc`, `mbsinit`, `mbsnrtowcs`, `mbsrtowcs`, `mbstowcs`,
519+ `mbtowc`, `mktime`, `putwc`, `putwchar`, `scanf`, `snprintf`, `sprintf`,
520+ `sscanf`, `stoi`, `stol`, `stoll`, `strcasecmp`, `strcasestr`, `strcoll`,
521+ `strfmon`, `strftime`, `strncasecmp`, `strptime`, `strtod`, `strtof`,
522+ `strtoimax`, `strtol`, `strtold`, `strtoll`, `strtoq`, `strtoul`,
523+ `strtoull`, `strtoumax`, `strtouq`, `strxfrm`, `swprintf`, `tolower`,
524+ `toupper`, `towctrans`, `towlower`, `towupper`, `ungetwc`, `vasprintf`,
525+ `vdprintf`, `versionsort`, `vfprintf`, `vfscanf`, `vfwprintf`, `vprintf`,
526+ `vscanf`, `vsnprintf`, `vsprintf`, `vsscanf`, `vswprintf`, `vwprintf`,
527+ `wcrtomb`, `wcscasecmp`, `wcscoll`, `wcsftime`, `wcsncasecmp`, `wcsnrtombs`,
528+ `wcsrtombs`, `wcstod`, `wcstof`, `wcstoimax`, `wcstol`, `wcstold`,
529+ `wcstoll`, `wcstombs`, `wcstoul`, `wcstoull`, `wcstoumax`, `wcswidth`,
530+ `wcsxfrm`, `wctob`, `wctomb`, `wctrans`, `wctype`, `wcwidth`, `wprintf`
503531
504532- For `strprintf`, `LogPrint`, `LogPrintf` formatting characters don't need size specifiers
505533
0 commit comments