MantisBT - CMake
View Issue Details
0013581CMakeCTestpublic2012-10-10 03:562016-06-10 14:31
Nils Gladitz 
Kitware Robot 
normalfeaturealways
closedmoved 
Windows7
CMake 2.8.9 
 
0013581: UTF-8 encode compiler output instead of [NON-UTF-8-BYTE-0x??] escapes
We've got a german language edition of visual studio 2010.
The included compiler generates diagnostic messages in german which may e.g. contain umlauts (non ASCII).
Those umlauts are replaced by ctest with "[NON-UTF-8-BYTE-0x??]" sequences.

Would it be possible to convert the output from current local codepage to utf-8?

Alternatively I'm guessing using the unicode version of the involved win32 functions (CreateProcessW(?)) and converting the resulting UTF-16 output to UTF-8 may also work.
No tags attached.
Issue History
2012-10-10 03:56Nils GladitzNew Issue
2012-10-10 07:45Brad KingNote Added: 0031200
2012-10-10 07:45Brad KingStatusnew => backlog
2014-04-04 09:51Clinton StimpsonNote Added: 0035636
2016-06-10 14:28Kitware RobotNote Added: 0042130
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0031200)
Brad King   
2012-10-10 07:45   
CTest currently assumes all build and test output is already encoded as UTF-8 which is easy to achieve on operating systems supporting environment variables like LC_ALL.

Off the top of my head I don't know exactly the right place to do the conversion. Most of CMake's internal APIs are based on std::string and/or char* so the conversion to UTF-8 would need to happen as early as possible to isolate the use of wide-character APIs.
(0035636)
Clinton Stimpson   
2014-04-04 09:51   
With the utf-8 work that has been going into CMake, there is now a switch to enable utf-8 as the internal encoding.

CMAKE_ENCODING_UTF8:BOOL=ON

I think the one thing left to fix this bug is to modify kwsysProcessPipeThreadReadPipe() in kwsys/ProcessWin32.c to convert the read data from the active code page to utf-8.
(0042130)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.