From 0cd409bd6dd6531e06bf8786f16700c8d7d71fbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 11 Jan 2017 19:54:00 +0100 Subject: [PATCH] Comment work --- src/x11_init.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/x11_init.c b/src/x11_init.c index e930e58b..b755f7f8 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -736,8 +736,11 @@ Cursor _glfwCreateCursorX11(const GLFWimage* image, int xhot, int yhot) int _glfwPlatformInit(void) { #if !defined(X_HAVE_UTF8_STRING) - // HACK: If the current locale is C, apply the environment's locale - // This is done because the C locale breaks wide character input + // HACK: If the current locale is "C" and the Xlib UTF-8 functions are + // unavailable, apply the environment's locale in the hope that it's + // both available and not "C" + // This is done because the "C" locale breaks wide character input, + // which is what we fall back on when UTF-8 support is missing if (strcmp(setlocale(LC_CTYPE, NULL), "C") == 0) setlocale(LC_CTYPE, ""); #endif