From 4247c9e2c2612394a5f4d63a65ba538f975906d4 Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 10 Nov 2009 05:30:26 +0100 Subject: Fixed 3962 - Berkeley DB, problems with unicode paths. --- cpp/src/Freeze/ObjectStore.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'cpp/src/Freeze/ObjectStore.cpp') 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 #include +#include + 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) { -- cgit v1.2.3