From fb58959f9a8a46e70e0486359b658d2e3084110e Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Fri, 28 Apr 2023 09:55:57 +0100 Subject: [PATCH] Bug 798885 - Accented character in folder name on Account Export Changed export_coa to use g_fopen instead of fopen --- libgnucash/backend/xml/gnc-xml-backend.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgnucash/backend/xml/gnc-xml-backend.cpp b/libgnucash/backend/xml/gnc-xml-backend.cpp index f1aa9e5109..b1c7deba54 100644 --- a/libgnucash/backend/xml/gnc-xml-backend.cpp +++ b/libgnucash/backend/xml/gnc-xml-backend.cpp @@ -28,6 +28,9 @@ #include #include #include +#if COMPILER(MSVC) +# define g_fopen fopen +#endif #include //for GNC_MOD_BACKEND #include @@ -337,7 +340,7 @@ GncXmlBackend::save_may_clobber_data() void GncXmlBackend::export_coa(QofBook* book) { - auto out = fopen(m_fullpath.c_str(), "w"); + auto out = g_fopen(m_fullpath.c_str(), "w"); if (out == NULL) { set_error(ERR_FILEIO_WRITE_ERROR);