On Mon, 16 Apr 2012 10:31:40 +0200 Hans-Peter Diettrich <drdiettri...@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 -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus