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).
---
Source/cmExecProgramCommand.cxx| 1 +
Source/cmExecuteProcessCommand.cxx | 1 +
Source/cmProcessT
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
2016-07-18 17:04 GMT+03:00 Brad King :
> 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]
>>
On 07/21/2016 01:36 PM, Dāvis Mosāns wrote:
> Anyway I improved this in places where it was easy, but in some places it's
> more complicated...
>
> For example
>
>while ((p = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR), p)) {
> // Put the output in the right place.
> if
2016-07-21 20:46 GMT+03:00 Brad King :
> On 07/21/2016 01:36 PM, Dāvis Mosāns wrote:
>> Anyway I improved this in places where it was easy, but in some places it's
>> more complicated...
>>
>> For example
>>
>>while ((p = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR), p))
>> {
>>
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
2016-08-02 20:11 GMT+03:00 Brad King :
>
> 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 cons