diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-05-09 13:07:41 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-05-09 13:07:41 +0000 |
commit | 197b6de9281b52d0b53c4b3fa3312e371b4469a9 (patch) | |
tree | bae93f8155da0770f5dd45d12ef1160ee99aed54 /cppe/src/IceE/Reference.cpp | |
parent | Added identityToString and stringToIdentity to Communicator (diff) | |
download | ice-197b6de9281b52d0b53c4b3fa3312e371b4469a9.tar.bz2 ice-197b6de9281b52d0b53c4b3fa3312e371b4469a9.tar.xz ice-197b6de9281b52d0b53c4b3fa3312e371b4469a9.zip |
Fixed proxy and identity t/from string functions to use string converters
Diffstat (limited to 'cppe/src/IceE/Reference.cpp')
-rw-r--r-- | cppe/src/IceE/Reference.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/cppe/src/IceE/Reference.cpp b/cppe/src/IceE/Reference.cpp index 8d2a1ac0958..2fafa0791b4 100644 --- a/cppe/src/IceE/Reference.cpp +++ b/cppe/src/IceE/Reference.cpp @@ -11,7 +11,6 @@ #include <IceE/ReferenceFactory.h> #include <IceE/LocalException.h> #include <IceE/Instance.h> -#include <IceE/IdentityUtil.h> #include <IceE/Endpoint.h> #include <IceE/BasicStream.h> @@ -184,7 +183,7 @@ IceInternal::Reference::toString() const // the reference parser uses as separators, then we enclose // the identity string in quotes. // - string id = identityToString(_identity); + string id = _instance->identityToString(_identity); if(id.find_first_of(" \t\n\r:@") != string::npos) { s += "\""; @@ -205,7 +204,15 @@ IceInternal::Reference::toString() const // the reference parser uses as separators, then we enclose // the facet string in quotes. // - string fs = IceUtil::escapeString(_facet, ""); + string fs = _facet; + if(_instance->initializationData().stringConverter) + { + UTF8BufferI buffer; + Byte* last = + _instance->initializationData().stringConverter->toUTF8(fs.data(), fs.data() + fs.size(), buffer); + fs = string(buffer.getBuffer(), last); + } + fs = IceUtil::escapeString(fs, ""); if(fs.find_first_of(" \t\n\r:@") != string::npos) { s += "\""; @@ -933,7 +940,14 @@ IceInternal::IndirectReference::toString() const // reference parser uses as separators, then we enclose the // adapter id string in quotes. // - string a = IceUtil::escapeString(_adapterId, ""); + string a = _adapterId; + if(getInstance()->initializationData().stringConverter) + { + UTF8BufferI buffer; + Byte* last = getInstance()->initializationData().stringConverter->toUTF8(a.data(), a.data() + a.size(), buffer); + a = string(buffer.getBuffer(), last); + } + a = IceUtil::escapeString(a, ""); if(a.find_first_of(" \t\n\r") != string::npos) { result.append("\""); |