[fpc-pascal] Executing external processes and codepages
Michael Van Canneyt
michael at freepascal.org
Wed May 11 14:18:57 CEST 2016
On Wed, 11 May 2016, Marco van de Voort wrote:
> In our previous episode, Michael Van Canneyt said:
>>>
>>> I don't like that. The 3.x idea is to get rid of manual conversions and
>>> hack-and-convert-it-as-you-go encoding management, not just rebadge the old
>>> practices to rawbytestring.
>>
>> You may not like it, but there is simply no other choice:
>>
>> Since you don't know what the receiving program does with the receives
>> arguments, all attempts to guess it are erroneous by definition.
>>
>> Only the programmer knows what the receiving program will do (or should),
>> so he must take it into account. Hence rawbytestring.
>
>> Don't pamper the programmer so much. He needs to make correct decisions.
>
> You are right, if that scenario was the common one. Note that Jonas hasn't
> named a scenario where it actually happens, so keeping it all manual for one
> basket case is IMHO not an option.
>
I honestly don't understand this argument: in 99,99% of all cases, the code will just
work if you use RawByteString, since everything will be in the codepage of
the environment anyway ?
Michael.
More information about the fpc-pascal
mailing list