Useful error message when locale is not set correctly

This commit is contained in:
Enno 2010-03-08 01:20:20 +01:00
parent d9b65024a0
commit 31b8d65f1f
2 changed files with 4 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
bin/

View File

@ -215,7 +215,9 @@ void locale_init(void)
{
setlocale(LC_CTYPE, "");
setlocale(LC_NUMERIC, "C");
assert(towlower(0xC4)==0xE4); /* Ä => ä */
if (towlower(0xC4)!=0xE4) { /* Ä => ä */
log_error(("Umlaut conversion is not working properly. Wrong locale? LANG=%s\n", getenv("LANG")));
}
}
extern void bind_eressea(struct lua_State * L);