aboutsummaryrefslogtreecommitdiff
path: root/src/sdtui.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2016-01-14 22:52:46 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2016-01-14 22:52:46 +0100
commit61f8b134a979b9db37ce275b330b3926959afef9 (patch)
tree043066a850bc808cfc76105381802232f881ebde /src/sdtui.c
parentc04ab011d1b87b98c78ccb39b8b1568a8baf2469 (diff)
downloadtdv-61f8b134a979b9db37ce275b330b3926959afef9.tar.gz
tdv-61f8b134a979b9db37ce275b330b3926959afef9.tar.xz
tdv-61f8b134a979b9db37ce275b330b3926959afef9.zip
Fix transcoding on OpenBSD
Diffstat (limited to 'src/sdtui.c')
-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);
}