summaryrefslogtreecommitdiff
path: root/cpp/src/Freeze/IndexI.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2014-05-02 19:56:38 +0200
committerJose <jose@zeroc.com>2014-05-02 19:56:38 +0200
commit1161c5817059464ab511632c0ce5d14593ced1a3 (patch)
tree51bbcdf2a4ea43c430312157350bb4271bc3f40d /cpp/src/Freeze/IndexI.cpp
parentUpdate .gitignore files (diff)
downloadice-1161c5817059464ab511632c0ce5d14593ced1a3.tar.bz2
ice-1161c5817059464ab511632c0ce5d14593ced1a3.tar.xz
ice-1161c5817059464ab511632c0ce5d14593ced1a3.zip
ICE-4851 - Use wstrings for input and output data that contain non-ASCII characters?
Diffstat (limited to 'cpp/src/Freeze/IndexI.cpp')
-rw-r--r--cpp/src/Freeze/IndexI.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/cpp/src/Freeze/IndexI.cpp b/cpp/src/Freeze/IndexI.cpp
index 3c05f862ee2..21231e707ca 100644
--- a/cpp/src/Freeze/IndexI.cpp
+++ b/cpp/src/Freeze/IndexI.cpp
@@ -12,7 +12,7 @@
#include <Freeze/ObjectStore.h>
#include <Freeze/EvictorI.h>
-#include <Ice/StringConverter.h>
+#include <IceUtil/StringConverter.h>
using namespace Freeze;
using namespace Ice;
@@ -379,13 +379,16 @@ Freeze::IndexI::associate(ObjectStoreBase* store, DbTxn* txn,
}
//
- // We keep _dbName as a native string here, while it might have
+ //
+ // Berkeley DB expects file paths to be UTF8 encoded. 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);
+ _db->open(txn,
+ IceUtil::nativeToUTF8(IceUtil::getProcessStringConverter(), store->evictor()->filename()).c_str(),
+ _dbName.c_str(), DB_BTREE, flags, FREEZE_DB_MODE);
flags = 0;
if(populateIndex)