mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
On Windows, convert filename parameter for xml parser to system codepage.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15749 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
656306e6dc
commit
e3a47d52b1
@ -727,7 +727,21 @@ sixtp_parse_file(sixtp *sixtp,
|
||||
gpointer *parse_result)
|
||||
{
|
||||
gboolean ret;
|
||||
xmlParserCtxtPtr context = xmlCreateFileParserCtxt( filename );
|
||||
xmlParserCtxtPtr context;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
{
|
||||
gchar *conv_name = g_win32_locale_filename_from_utf8(filename);
|
||||
if (!conv_name) {
|
||||
g_warning("Could not convert '%s' to system codepage", filename);
|
||||
return FALSE;
|
||||
}
|
||||
context = xmlCreateFileParserCtxt(conv_name);
|
||||
g_free(conv_name);
|
||||
}
|
||||
#else
|
||||
context = xmlCreateFileParserCtxt(filename);
|
||||
#endif
|
||||
ret = sixtp_parse_file_common(sixtp, context, data_for_top_level,
|
||||
global_data, parse_result);
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user