Fix transcoding on OpenBSD

This commit is contained in:
Přemysl Eric Janouch 2016-01-14 22:52:46 +01:00
parent c04ab011d1
commit 61f8b134a9
1 changed files with 5 additions and 1 deletions

View File

@ -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);
}