summaryrefslogtreecommitdiff
path: root/cpp/src/Freeze/ObjectStore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Freeze/ObjectStore.cpp')
-rw-r--r--cpp/src/Freeze/ObjectStore.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/cpp/src/Freeze/ObjectStore.cpp b/cpp/src/Freeze/ObjectStore.cpp
index 8e433b9eae9..0811507bfb4 100644
--- a/cpp/src/Freeze/ObjectStore.cpp
+++ b/cpp/src/Freeze/ObjectStore.cpp
@@ -15,6 +15,8 @@
#include <Freeze/TransactionI.h>
#include <Freeze/IndexI.h>
+#include <Ice/StringConverter.h>
+
using namespace std;
using namespace Ice;
using namespace Freeze;
@@ -120,7 +122,14 @@ Freeze::ObjectStoreBase::ObjectStoreBase(const string& facet, const string& face
flags |= DB_CREATE;
}
- _db->open(txn, evictor->filename().c_str(), _dbName.c_str(), DB_BTREE, flags, FREEZE_DB_MODE);
+ //
+ // We keep _dbName as a native string here, while it might have
+ // been better to convert it to UTF-8, changing this isn't
+ // possible without potentially breaking backward compatibility
+ // with deployed databases.
+ //
+ _db->open(txn, Ice::nativeToUTF8(evictor->communicator(), evictor->filename()).c_str(), _dbName.c_str(),
+ DB_BTREE, flags, FREEZE_DB_MODE);
for(size_t i = 0; i < _indices.size(); ++i)
{