ensure that xmlKeepBlankDefault() is called early in instance-life, from PBD::init()
[ardour.git] / libs / pbd / pbd.cc
index d453468f3c66d6c7275a30de5ab489577bbfb886..8b55692e807d1f64a1bab02ff8ac9f5c2e2c44f2 100644 (file)
@@ -36,6 +36,7 @@
 #include "pbd/id.h"
 #include "pbd/enumwriter.h"
 #include "pbd/fpu.h"
+#include "pbd/xml++.h"
 
 #ifdef PLATFORM_WINDOWS
 #include <winsock2.h>
@@ -130,6 +131,14 @@ PBD::init ()
 
        set_debug_options_from_env ();
 
+       /* this call is made by any call to XMLTree::read() and its cousins. It
+          sets the handling of blank space to match the libxml2 standard,
+          rather than the libxml1 version. Without this, the behavior is
+          defined by whoever calls it first.
+       */
+
+       xmlKeepBlanksDefault (0);
+
        libpbd_initialized = true;
        return true;
 }