2016-08-02 20:11 GMT+03:00 Brad King <brad.k...@kitware.com>: > > How are we to know the encoding being produced by the child? >
There isn't any reliable way to detect it, we just have to know what particular application uses. Also there aren't any standard or API to determine it but generally most applications use console's code page. Of course not all, it could be OEM, ANSI or something else. If application uses console's code page for pipes then app.exe | echo will output correctly in cmd and piping in other application which also uses it will work. Here our issue is that when CMake checks for compiler path it gets output from MSVC and it will give this path in console's codepage which will be incorrectly interpreted as UTF-8 so we need to decode it first. If there will some other application which uses different encoding then it will need separate handling for that. -- 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