diff options
author | Jose <jose@zeroc.com> | 2009-11-10 05:30:26 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2009-11-10 05:30:26 +0100 |
commit | 4247c9e2c2612394a5f4d63a65ba538f975906d4 (patch) | |
tree | 96d3308681d9b0684ce5dd763f5a5d415eaf09d7 /cpp/src/Ice/Reference.cpp | |
parent | Win32 64 bits compilation error (diff) | |
download | ice-4247c9e2c2612394a5f4d63a65ba538f975906d4.tar.bz2 ice-4247c9e2c2612394a5f4d63a65ba538f975906d4.tar.xz ice-4247c9e2c2612394a5f4d63a65ba538f975906d4.zip |
Fixed 3962 - Berkeley DB, problems with unicode paths.
Diffstat (limited to 'cpp/src/Ice/Reference.cpp')
-rw-r--r-- | cpp/src/Ice/Reference.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp index 7bffecdd084..6c59ef62da7 100644 --- a/cpp/src/Ice/Reference.cpp +++ b/cpp/src/Ice/Reference.cpp @@ -220,14 +220,7 @@ IceInternal::Reference::toString() const // the reference parser uses as separators, then we enclose // the facet string in quotes. // - string fs = _facet; - if(_instance->initializationData().stringConverter) - { - UTF8BufferI buffer; - Byte* last = - _instance->initializationData().stringConverter->toUTF8(fs.data(), fs.data() + fs.size(), buffer); - fs = string(reinterpret_cast<const char*>(buffer.getBuffer()), last - buffer.getBuffer()); - } + string fs = Ice::nativeToUTF8(_instance->initializationData().stringConverter, _facet); fs = IceUtilInternal::escapeString(fs, ""); if(fs.find_first_of(" :@") != string::npos) { @@ -1114,14 +1107,7 @@ IceInternal::RoutableReference::toString() const // reference parser uses as separators, then we enclose the // adapter id string in quotes. // - string a = _adapterId; - StringConverterPtr stringConverter = getInstance()->initializationData().stringConverter; - if(stringConverter) - { - UTF8BufferI buffer; - Byte* last = stringConverter->toUTF8(a.data(), a.data() + a.size(), buffer); - a = string(reinterpret_cast<const char*>(buffer.getBuffer()), last - buffer.getBuffer()); - } + string a = Ice::nativeToUTF8(getInstance()->initializationData().stringConverter, _adapterId); a = IceUtilInternal::escapeString(a, ""); if(a.find_first_of(" :@") != string::npos) { @@ -1131,7 +1117,7 @@ IceInternal::RoutableReference::toString() const } else { - result.append(_adapterId); + result.append(a); } } else |