[glib: 1/2] glib-mkenums: Specify output encoding as UTF-8 explicitly for non-English locale
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] glib-mkenums: Specify output encoding as UTF-8 explicitly for non-English locale
- Date: Mon, 19 Sep 2022 14:34:02 +0000 (UTC)
commit ebcc3c01db27b79af38b42c3c52a79d0225f744c
Author: Seungha Yang <seungha centricular com>
Date: Sun Aug 14 04:56:20 2022 +0900
glib-mkenums: Specify output encoding as UTF-8 explicitly for non-English locale
Fixup regression introduced by
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2797
gobject/glib-mkenums.in | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
index b996a733a6..632ba5d51a 100755
--- a/gobject/glib-mkenums.in
+++ b/gobject/glib-mkenums.in
@@ -19,6 +19,9 @@ import errno
import codecs
import locale
+# Non-english locale systems might complain to unrecognized character
+sys.stdout = io.TextIOWrapper(sys.stdout.detach(), encoding='utf-8')
+
VERSION_STR = '''glib-mkenums version @VERSION@
glib-mkenums comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of glib-mkenums under the terms of
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]