Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add setlocale() calls around use of libarchive APIs (#14934, #15377) | Brad King | 2015-02-06 | 1 | -0/+31 |
The libarchive APIs use nl_langinfo(CODESET) for iconv so they need the locale to be set for LC_CTYPE. However, the rest of CMake does not define any behavior for non-ASCII character classification/conversion so we do not want to setlocale() globally. Add a RAII class to save, set, and restore the locale around calls to libarchive APIs. Inspired-by: Clinton Stimpson <clinton@elemtech.com> |