On 07/07/2016 05:54 PM, Dāvis Mosāns wrote: > Typically Windows applications (eg. MSVC compiler) use current console's > codepage for output to pipes so we need to encode that to internally used > encoding (KWSYS_ENCODING_DEFAULT_CODEPAGE). [snip] > while ((p = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR), p)) { > + cmsysProcess_DecodeTextOutput(cp, &data, &length); [snip] > while ((p = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR), p)) { > + cmsysProcess_DecodeTextOutput(cp, &data, &length);
Unfortunately I don't think that pattern will work reliably because a multi-byte character could be split across a buffering boundary and therefore not decoded correctly. We may need the consuming contexts to collect the whole output before converting. Also, I'd like to avoid modifying KWSys Process for this if possible because it may be replaced by libuv so we need the conversion code to be in CMake proper. Thanks, -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers