From e8f8ec027dfa3ebb3d20a75fcf7f8a794fea415d Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 15 Mar 2015 15:55:54 +0100 Subject: [PATCH] Documented C locale hack. --- src/x11_init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/x11_init.c b/src/x11_init.c index dc460aaf..19b5ab9d 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -714,6 +714,8 @@ Cursor _glfwCreateCursor(const GLFWimage* image, int xhot, int yhot) int _glfwPlatformInit(void) { + // HACK: If the current locale is C, apply the environment's locale + // This is done because the C locale breaks character input if (strcmp(setlocale(LC_CTYPE, NULL), "C") == 0) setlocale(LC_CTYPE, "");