[Lazarus] TProcess, UTF8, Windows

Marco van de Voort marcov at stack.nl
Sun Apr 15 15:37:15 CEST 2012


On Sun, Apr 15, 2012 at 03:24:32PM +0200, Martin Schreiber wrote:
> > Basically if you use "utf8string" you get a string that forces UTF-8.
> >
> And if you use "String" (= AnsiString(CP_ACP) if my assumption about current 
> FPC trunk is correct) it forces it to the 8bit system encoding. The only 
> stringtype which does not enforce encoding is "RawByteString".
> All "AFAIK" of course. ;-)

That's correct. But in Windows, you use Windows functions for conversion,
and CP_ACP is a valid value there. On *nix, you first have to find out what
the local encoding is, and it seems that Mattias is detecting a problem
there.

Be careful with assuming too much about RawBytestring being a normal type.
In Delphi it is afaik only used in parameters (and function return values),
more or less as a kind of open array type.

There are no variables of the type "rawbytestring" defined.




More information about the Lazarus mailing list