From 1161c5817059464ab511632c0ce5d14593ced1a3 Mon Sep 17 00:00:00 2001 From: Jose Date: Fri, 2 May 2014 19:56:38 +0200 Subject: ICE-4851 - Use wstrings for input and output data that contain non-ASCII characters? --- cpp/src/Slice/Preprocessor.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cpp/src/Slice/Preprocessor.cpp') 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 #include #include +#include #include #include #include @@ -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+"); } -- cgit v1.2.3