In the function(s) utf8_decode(const std::string&) in include/indicators/display_width.hpp and single_include\indicators\indicators.hpp the line
std::string curLocale = setlocale(LC_ALL, "");
should save the program locale in curLocale for restoring it later. Instead, it sets the program locale to the shell locale. The line shoud be replaced by the two lines
Just wanted to add that this bug caused problems when parsing floating point numbers using https://github.com/nlohmann/json. The suggested two-line fix worked great. Thanks @albertocasagrande!
set_progress
andmark_as_completed
change the program locale and set it to the shell one.Demo
Bug location and possible solution
In the function(s)
utf8_decode(const std::string&)
ininclude/indicators/display_width.hpp
andsingle_include\indicators\indicators.hpp
the lineshould save the program locale in
curLocale
for restoring it later. Instead, it sets the program locale to the shell locale. The line shoud be replaced by the two linesThe first one save the program locale and the second one set the shell locale for UTF8 decoding.
bug_locale.patch