From 61f8b134a979b9db37ce275b330b3926959afef9 Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Thu, 14 Jan 2016 22:52:46 +0100
Subject: Fix transcoding on OpenBSD
---
src/sdtui.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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);
}
--
cgit v1.2.3-70-g09d2