From 31b8d65f1f697988f01bb1d89f79cd73cd6e2134 Mon Sep 17 00:00:00 2001 From: Enno Date: Mon, 8 Mar 2010 01:20:20 +0100 Subject: [PATCH] Useful error message when locale is not set correctly --- .gitignore | 1 + src/main.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..e660fd93d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +bin/ diff --git a/src/main.c b/src/main.c index ebf949f04..49f8503fb 100644 --- a/src/main.c +++ b/src/main.c @@ -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);