Skip to content

Commit

Permalink
- Fixed build for windows.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12435 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Aug 6, 2012
1 parent 0ad152d commit e378b33
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Compiler/runtime/systemimpl.c
Expand Up @@ -1728,10 +1728,14 @@ void SystemImpl__gettextInit(const char *locale)
1);
} else if (*locale) {
/* We succesfully forced a new non-system locale; let's clear some variables */
#if defined(__MINGW32__)
putenv("LANGUAGE=");
#else
unsetenv("LANGUAGE");
#endif
/* Try to make sure we force UTF-8; else gettext will fail */
clocale = setlocale(LC_CTYPE, NULL);
if (!(strcasestr(clocale, "UTF-8") || strcasestr(clocale, "UTF8")))
if (!(strstr(clocale, "UTF-8") || strstr(clocale, "UTF8") || strstr(clocale, "utf-8") || strstr(clocale, "utf8")))
setlocale(LC_CTYPE, "C.UTF-8");
}
#if defined(__MINGW32__)
Expand Down

0 comments on commit e378b33

Please sign in to comment.