[cmake-developers] [PATCH v4 4/4] For Windows encode process output to internally used encoding
Brad King
brad.king at kitware.com
Tue Aug 2 13:11:04 EDT 2016
On 07/21/2016 08:43 PM, Dāvis Mosāns wrote:
> With MultiByteToWideChar such partial char would be replaced with ? (U+003F)
> or � (U+FFFD).
[snip]
> Also could check if last character is ? and try again with one byte less.
This may be a good middle ground. The excess bytes would then be buffered
for inclusion at the beginning of the next block conversion.
How are we to know the encoding being produced by the child?
> from WaitForData we're getting data and length, and I assume that data
> might not be null-terminated but kwsysEncoding_mbstowcs expects source to be
> null-terminated and doesn't accept length.
Okay, thanks. Using MultiByteToWideChar for Windows-specific code is
fine. If we ever need to offer a similar generalization then we can
provide a kwsysEncoding_mbsnrtowcs later.
BTW, with all your changes to KWSys it may be easier to iterate
if you contribute to KWSys directly. Please see instructions here:
http://public.kitware.com/Wiki/KWSys/Git/Develop
Thanks,
-Brad
More information about the cmake-developers
mailing list