summaryrefslogtreecommitdiff
path: root/cpp/src/Freeze/IndexI.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2009-11-10 05:30:26 +0100
committerJose <jose@zeroc.com>2009-11-10 05:30:26 +0100
commit4247c9e2c2612394a5f4d63a65ba538f975906d4 (patch)
tree96d3308681d9b0684ce5dd763f5a5d415eaf09d7 /cpp/src/Freeze/IndexI.cpp
parentWin32 64 bits compilation error (diff)
downloadice-4247c9e2c2612394a5f4d63a65ba538f975906d4.tar.bz2
ice-4247c9e2c2612394a5f4d63a65ba538f975906d4.tar.xz
ice-4247c9e2c2612394a5f4d63a65ba538f975906d4.zip
Fixed 3962 - Berkeley DB, problems with unicode paths.
Diffstat (limited to 'cpp/src/Freeze/IndexI.cpp')
-rw-r--r--cpp/src/Freeze/IndexI.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/cpp/src/Freeze/IndexI.cpp b/cpp/src/Freeze/IndexI.cpp
index 0115e58a7b2..9ae86a27f63 100644
--- a/cpp/src/Freeze/IndexI.cpp
+++ b/cpp/src/Freeze/IndexI.cpp
@@ -12,6 +12,8 @@
#include <Freeze/ObjectStore.h>
#include <Freeze/EvictorI.h>
+#include <Ice/StringConverter.h>
+
using namespace Freeze;
using namespace Ice;
using namespace std;
@@ -354,7 +356,14 @@ Freeze::IndexI::associate(ObjectStoreBase* store, DbTxn* txn,
flags = DB_CREATE;
}
- _db->open(txn, store->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(store->communicator(), store->evictor()->filename()).c_str(), _dbName.c_str(),
+ DB_BTREE, flags, FREEZE_DB_MODE);
flags = 0;
if(populateIndex)