summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-06-23 22:45:08 +0000
committerDavid Robillard <d@drobilla.net>2007-06-23 22:45:08 +0000
commit51918d8e3743d178bba2dbd788c8a5c3fc7cc3bc (patch)
treebb062ba7557f88da80d2e6427f5d67f077b7643b /src/libs/client
parent4f3671892be72cdd39b1a9e76f7cd4d9962f40c0 (diff)
downloadingen-51918d8e3743d178bba2dbd788c8a5c3fc7cc3bc.tar.gz
ingen-51918d8e3743d178bba2dbd788c8a5c3fc7cc3bc.tar.bz2
ingen-51918d8e3743d178bba2dbd788c8a5c3fc7cc3bc.zip
Possible fix for serialisation in locales with , as decimal point.
git-svn-id: http://svn.drobilla.net/lad/ingen@540 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/Serializer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libs/client/Serializer.cpp b/src/libs/client/Serializer.cpp
index 4a746ae1..92b0ad41 100644
--- a/src/libs/client/Serializer.cpp
+++ b/src/libs/client/Serializer.cpp
@@ -27,6 +27,7 @@
#include <cstdlib> // atof
#include <boost/optional/optional.hpp>
#include <cstring>
+#include <locale.h>
#include <raul/RDFWorld.h>
#include <raul/RDFModel.h>
#include <raul/RDFNode.h>
@@ -64,6 +65,8 @@ Serializer::Serializer(Raul::RDF::World& world)
void
Serializer::start_to_filename(const string& filename)
{
+ setlocale(LC_NUMERIC, "C");
+
_base_uri = "file://" + filename;
_model = new RDF::Model(_world);
_mode = TO_FILE;
@@ -81,6 +84,8 @@ Serializer::start_to_filename(const string& filename)
void
Serializer::start_to_string()
{
+ setlocale(LC_NUMERIC, "C");
+
_base_uri = "";
_model = new RDF::Model(_world);
_mode = TO_STRING;