From 566767b84eb34d610eb99959143b80bedd888548 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 26 Jan 2025 22:15:49 -0800 Subject: [PATCH] Use gtk_disable_setlocale * src/pgtkterm.c (pgtk_term_init): * src/xterm.c (x_term_init): Use gtk_disable_setlocale rather than fixup_locale. (cherry picked from commit 06fd3f4e98d683b6595899861e47e931724e7020) --- src/pgtkterm.c | 5 +---- src/xterm.c | 6 ++---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 41bec344799..2da1006b6f7 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -7070,13 +7070,10 @@ pgtk_term_init (Lisp_Object display_name, char *resource_name) id = g_log_set_handler ("GLib", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, my_log_handler, NULL); - /* gtk_init does set_locale. Fix locale before and after. */ - fixup_locale (); + gtk_disable_setlocale (); unrequest_sigio (); /* See comment in x_display_ok. */ gtk_init (&argc, &argv2); request_sigio (); - fixup_locale (); - g_log_remove_handler ("GLib", id); diff --git a/src/xterm.c b/src/xterm.c index 00c61c486ed..fd61d5df91c 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -30651,8 +30651,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) Call before gtk_init so Gtk+ event filters comes after our. */ gdk_window_add_filter (NULL, event_handler_gdk, NULL); - /* gtk_init does set_locale. Fix locale before and after. */ - fixup_locale (); + gtk_disable_setlocale (); unrequest_sigio (); /* See comment in x_display_ok. */ gtk_init (&argc, &argv2); request_sigio (); @@ -30661,8 +30660,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) xg_initialize (); - /* Do this after the call to xg_initialize, because when - Fontconfig is used, xg_initialize calls its initialization + /* When Fontconfig is used, xg_initialize calls its initialization function which in some versions of Fontconfig calls setlocale. */ fixup_locale (); -- 2.39.5