Bug 795039 - Crash on startup using Technicolor Style sheet in report

The mingw-w64 toolchain bizarrely substitutes scm_to_locale_string()
for scm_to_utf8_string(). This results in latin1 (yeah, "locale" is
a lie) instead of utf8 which causes an assertion in
g_utf8_collate_key().

Perhaps equally bizarre, the compiler doesn't make the substitution
with scm_to_utf8_stringn(), so use that instead.
This commit is contained in:
John Ralls
2018-04-13 14:02:57 -07:00
parent 01420adb99
commit f680823dbf
2 changed files with 3 additions and 3 deletions

View File

@@ -43,7 +43,7 @@ gchar *gnc_scm_to_utf8_string(SCM scm_string)
gchar* s;
char * str;
str = scm_to_utf8_string(scm_string);
str = scm_to_utf8_stringn(scm_string, NULL);
s = g_strdup(str);
free (str);
return s;