[fpc-pascal] Executing external processes and codepages

Marco van de Voort marcov at stack.nl
Wed May 11 11:47:33 CEST 2016


In our previous episode, Michael Van Canneyt said:
> > I'm not sure what you are suggesting as alternative. Saving the encoding at
> > startup, so it can be reused in cases like this, in case somebody change
> > defaultsystemcodepage?
> >
> > Or using defaultsystemcodepage instead of filesystem encoding?
> 
> Why not simply make the exec calls use RawByteString ?
> 
> It is then the responsability of the programmer. 
> 99,99% of cases it will get passed the correct system encoding, and if need
> be the programmer can change it.

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.
 



More information about the fpc-pascal mailing list