Skip to content
Snippets Groups Projects
Commit d3846db1 authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Fix setlocale() on startup

parent 54a897b5
No related branches found
No related tags found
No related merge requests found
......@@ -544,8 +544,8 @@ main(int argc, char **argv)
start_time = ev_time();
#ifndef __APPLE__
/* set locale to make iswXXXX function work */
if (setlocale(LC_CTYPE, "C.UTF-8") == NULL ||
setlocale(LC_CTYPE, "en_US.UTF-8") == NULL ||
if (setlocale(LC_CTYPE, "C.UTF-8") == NULL &&
setlocale(LC_CTYPE, "en_US.UTF-8") == NULL &&
setlocale(LC_CTYPE, "en_US.utf8") == NULL)
fprintf(stderr, "Failed to set locale to C.UTF-8\n");
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment