summaryrefslogtreecommitdiff
path: root/libs/pbd/xml++.cc
diff options
context:
space:
mode:
authorJohn Emmas <johne53@tiscali.co.uk>2015-07-23 17:50:36 +0100
committerJohn Emmas <johne53@tiscali.co.uk>2015-07-23 17:55:13 +0100
commitcf5a8651d848fa5333e1c567286fc0eec2b0a0f7 (patch)
treeabe5fb0ee6f09873735f9716a21a8c8b592cb138 /libs/pbd/xml++.cc
parentf89a976f1a0477fba30bd7117310e6d04b370d68 (diff)
When saving a session (in a non-English locale) make sure that we use a locale-specific path
Diffstat (limited to 'libs/pbd/xml++.cc')
-rw-r--r--libs/pbd/xml++.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/pbd/xml++.cc b/libs/pbd/xml++.cc
index 5fb777bdc7..3c6541fd56 100644
--- a/libs/pbd/xml++.cc
+++ b/libs/pbd/xml++.cc
@@ -11,6 +11,8 @@
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
+#include <glibmm/convert.h>
+
xmlChar* xml_version = xmlCharStrdup("1.0");
using namespace std;
@@ -154,7 +156,7 @@ XMLTree::write() const
doc = xmlNewDoc(xml_version);
xmlSetDocCompressMode(doc, _compression);
writenode(doc, _root, doc->children, 1);
- result = xmlSaveFormatFileEnc(_filename.c_str(), doc, "UTF-8", 1);
+ result = xmlSaveFormatFileEnc(Glib::locale_from_utf8 (_filename).c_str(), doc, "UTF-8", 1);
#ifndef NDEBUG
if (result == -1) {
xmlErrorPtr xerr = xmlGetLastError ();