summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2022-07-22 21:40:23 +0200
committerChristian Persch <chpe@src.gnome.org>2022-07-22 21:40:23 +0200
commitcf95cc6c6b7860a7d61ef72bb80bc8211cf40c04 (patch)
tree913aa801760e87bd830073f53f0dfa63bf854d32 /src
parent5d5c1f74979c9e81da449b593b17e31e6d14e1f4 (diff)
downloadgnome-terminal-cf95cc6c6b7860a7d61ef72bb80bc8211cf40c04.tar.gz
profile: editor: Skip unknown charsets
Don't list charsets in the list that are unknown to ICU since using them won't work anyway.
Diffstat (limited to 'src')
-rw-r--r--src/profile-editor.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/profile-editor.cc b/src/profile-editor.cc
index a99fb892..cc3c5f40 100644
--- a/src/profile-editor.cc
+++ b/src/profile-editor.cc
@@ -835,6 +835,10 @@ append_encodings_for_group (GtkTreeStore *store,
if (encodings[i].group != group)
continue;
+ /* Skip encodings not supported by ICU */
+ if (terminal_util_translate_encoding (encodings[i].charset) == nullptr)
+ continue;
+
gs_free char *name = g_strdup_printf ("%s " EM_DASH " %s",
_(encodings[i].name), encodings[i].charset);