diff options
author | Jose <jose@zeroc.com> | 2014-05-02 19:56:38 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2014-05-02 19:56:38 +0200 |
commit | 1161c5817059464ab511632c0ce5d14593ced1a3 (patch) | |
tree | 51bbcdf2a4ea43c430312157350bb4271bc3f40d /cpp/src/Slice/Preprocessor.cpp | |
parent | Update .gitignore files (diff) | |
download | ice-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/Slice/Preprocessor.cpp')
-rw-r--r-- | cpp/src/Slice/Preprocessor.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp index a4981328ed7..da37e868ef9 100644 --- a/cpp/src/Slice/Preprocessor.cpp +++ b/cpp/src/Slice/Preprocessor.cpp @@ -11,6 +11,7 @@ #include <Slice/Preprocessor.h> #include <Slice/Util.h> #include <IceUtil/StringUtil.h> +#include <IceUtil/StringConverter.h> #include <IceUtil/FileUtil.h> #include <IceUtil/UUID.h> #include <IceUtil/Unicode.h> @@ -232,7 +233,11 @@ Slice::Preprocessor::preprocess(bool keepComments, const string& extraArgs) wchar_t* name = _wtempnam(NULL, L".preprocess"); if(name) { - _cppFile = IceUtil::wstringToString(name); + // + // Don't need to pass a wide string converter the wide string + // come from Windows API. + // + _cppFile = IceUtil::wnativeToNative(IceUtil::getProcessStringConverter(), 0, name); free(name); _cppHandle = IceUtilInternal::fopen(_cppFile, "w+"); } |