Re: [cmake-developers] [PATCH v7] For Windows encode process output to internally used encoding

2016-10-30 Thread Dāvis Mosāns
2016-08-17 16:47 GMT+03:00 Brad King :
> I squashed in one warning fix:
>
>  Windows: Encode child process output to internally-used encoding
>  https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=12924660
>
> However, then I had to revert the change from `next` because it
> causes the CTest.UpdateGIT test to fail on Windows machines.
> I think the problem is that we run Git with a `-z` option to
> produce binary output.  In such cases we should not do any
> encoding conversions.  cmProcessTools and RunSingleCommand
> will need to gain options for this.

While git's `-z` flag caused test to fail it wasn't because of binary
output (we're still working with text data like commit messages and
file names) but it showed a bug that we would truncate output till
first null byte. `-z` option specifies that git will use null bytes as
separators between entries and it's independent from used text
encoding. We still need to decode git's output (which contains null
bytes) to our internal encoding.

> Also I noticed that if DecodeText buffers partial characters we
> may need a finalize step later to finish them off.  Otherwise
> invalid byte sequences may be dropped if they appear at the end.
>
> Please fetch the above version and revise it as needed.
>

I've fixed it and submitted MR to
https://gitlab.kitware.com/cmake/cmake/merge_requests/221
-- 

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


Re: [cmake-developers] [PATCH v7] For Windows encode process output to internally used encoding

2016-08-17 Thread Brad King
On 08/17/2016 06:11 AM, Dāvis Mosāns wrote:
>> Applied with minor tweaks and merged to `next` for testing:
> 
> Great! Thanks!

I squashed in one warning fix:

 Windows: Encode child process output to internally-used encoding
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=12924660

However, then I had to revert the change from `next` because it
causes the CTest.UpdateGIT test to fail on Windows machines.
I think the problem is that we run Git with a `-z` option to
produce binary output.  In such cases we should not do any
encoding conversions.  cmProcessTools and RunSingleCommand
will need to gain options for this.

Also I noticed that if DecodeText buffers partial characters we
may need a finalize step later to finish them off.  Otherwise
invalid byte sequences may be dropped if they appear at the end.

Please fetch the above version and revise it as needed.

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

Re: [cmake-developers] [PATCH v7] For Windows encode process output to internally used encoding

2016-08-16 Thread Brad King
On 08/15/2016 04:34 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).

Thanks.  Applied with minor tweaks and merged to `next` for testing:

 Windows: Encode child process output to internally-used encoding
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a818239

-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