Am 2014-11-22 um 15:06 schrieb Mattias Gaertner: > procedure TForm1.FormCreate(Sender: TObject); > var s: string; // String = AnsiString because of $H+ > begin > s:=GetCommandLineW; > // GetCommandLineW returns a UTF-16 PWideChar > // the compiler adds code to convert this to the > // default system codepage (CP_ACP = CP_UTF8) > // the resulting string has StringCodePage CP_ACP > // and is encoded in UTF-8. > // therefore you can simply use it with the LCL
Okay. Does that mean that the compiler *always* assumes that String=UTF-8 encoded AnsiString and converts to other (known) encoded string types if needed? -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
