[Lazarus] TProcess, UTF8, Windows

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Apr 16 10:08:47 CEST 2012


On Mon, 16 Apr 2012 10:31:40 +0200
Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:

> Mattias Gaertner schrieb:
> 
> >> And probably Mattias is wrong if he thinks "String" in FPC trunk does not 
> >> enforce encoding if I understood correctly.
> > 
> > "string" enforces an 8-bit type.
> 
> You obviously talk about AnsiString, not the new String=UnicodeString.
> 
> > It does not enforce a specific codepage like utf8string. At least under
> > Linux.
> > Assign a CP_UTF8 and the string becomes CP_UTF8, assign a CP_ACP and it
> > becomes CP_ACP, assign a CP_UTF16 and it becomes DefaultSystemCodePage.
> 
> Do you see a difference between CP_ACP and DefaultSystemCodePage? 

CP_ACP is a constant. DefaultSystemCodePage is a variable set to one
of the CP_ constants.


> In 
> Delphi it's the same (by default), and AnsiString(0) is equivalent to 
> AnsiString(CP_ACP).

CP_ACP is 0 under FPC too.

Mattias




More information about the Lazarus mailing list