diff options
author | Bernard Normier <bernard@zeroc.com> | 2014-05-09 14:14:44 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2014-05-09 14:14:44 -0400 |
commit | af7abbbcf9606d741d12d27ef05710c80aa55cc2 (patch) | |
tree | 8cd667af9ed3f66c0f57b246ee2fef4d3ff3eae2 /cpp/src/IceUtil/StringConverter.cpp | |
parent | Fixed make clean failure (diff) | |
download | ice-af7abbbcf9606d741d12d27ef05710c80aa55cc2.tar.bz2 ice-af7abbbcf9606d741d12d27ef05710c80aa55cc2.tar.xz ice-af7abbbcf9606d741d12d27ef05710c80aa55cc2.zip |
Removed UTF8ToCodePage helper function in favor of WindowsStringConverter, optimized WindowsStringConverter::fromUTF8 when CP=UTF8
Diffstat (limited to 'cpp/src/IceUtil/StringConverter.cpp')
-rw-r--r-- | cpp/src/IceUtil/StringConverter.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/IceUtil/StringConverter.cpp b/cpp/src/IceUtil/StringConverter.cpp index 2a57b719695..8d4ebf5870c 100644 --- a/cpp/src/IceUtil/StringConverter.cpp +++ b/cpp/src/IceUtil/StringConverter.cpp @@ -442,6 +442,12 @@ WindowsStringConverter::fromUTF8(const Byte* sourceStart, const Byte* sourceEnd, return; } + if(_cp == CP_UTF8) + { + target.insert(0, reinterpret_cast<const char*>(sourceStart), sourceEnd - sourceStart); + return; + } + // // First convert to wstring (UTF-16) // |