summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dillo.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dillo.cc b/src/dillo.cc
index b05cb16a..8c720e5a 100644
--- a/src/dillo.cc
+++ b/src/dillo.cc
@@ -321,6 +321,16 @@ int main(int argc, char **argv)
}
dFree(opt_argv);
+
+ /* On X, the first fl_open_display() sets the LC_CTYPE aspect of the locale
+ * from the environment, so let's trigger it ourselves so that we can
+ * deal with this. For our purposes, this is very bad in Turkic locales
+ * where 'i' and 'I' are different letters, and strcasecmp(), toupper(),
+ * tolower() no longer work as expected. So we reset it to the C locale.
+ */
+ fl_open_display();
+ setlocale(LC_CTYPE, "C");
+
// set the default values for the preferences
a_Prefs_init();