[fpc-pascal] Executing external processes and codepages

Michael Van Canneyt michael at freepascal.org
Wed May 11 12:20:14 CEST 2016



On Wed, 11 May 2016, Jonas Maebe wrote:

>
> Michael Van Canneyt wrote on Wed, 11 May 2016:
>
>> On Wed, 11 May 2016, Marco van de Voort wrote:
>> 
>>> 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.
>
> It will either interpret them according to the code page specified by the 
> environment, or not perform any interpretation at all. In both cases, 
> converting the arguments to the code page of the environment is the right 
> thing to do.

And in the case it makes an assumption of the code page, regardless of
environment variables ?

(don't say that doesn't happen. It does, I know a programmer that does so)

Michael.



More information about the fpc-pascal mailing list