Since setlocal is now set by the application, remove setting user-preferences from the search. In the case it is needed, do not forget to keep a backup of setlocale with std::string (to keep name in memory) and restore the locale after the use (which was not done and lead to a bug where encoding change)