aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sdtui.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sdtui.c b/src/sdtui.c
index 69d3301..40ecaa4 100644
--- a/src/sdtui.c
+++ b/src/sdtui.c
@@ -272,7 +272,11 @@ app_init (Application *self, AppOptions *options, const gchar *filename)
const char *charset;
self->locale_is_utf8 = g_get_charset (&charset);
- self->ucs4_to_locale = g_iconv_open (charset, "UTF-32");
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+ self->ucs4_to_locale = g_iconv_open (charset, "UTF-32LE");
+#else // G_BYTE_ORDER != G_LITTLE_ENDIAN
+ self->ucs4_to_locale = g_iconv_open (charset, "UTF-32BE");
+#endif // G_BYTE_ORDER != G_LITTLE_ENDIAN
app_reload_view (self);
}