On Sunday 15 April 2012 13:33:05 Mattias Gaertner wrote: > On Sun, 15 Apr 2012 13:00:12 +0200 > > > I assume Lazarus uses that string type everywhere where it expects utf-8, > > same as MSEgui uses msestring (=UnicodeString) everywhere it expects > > utf-16? > > UnicodeString has a clear advantage versus WideString (reference > counting). > > I don't see the clear advantage of UTF8String. > Using UTF8String instead of String (CP_UTF8 or CP_ACP) forces strings > to CP_UTF8. This may slow down some assignments, may speed up some > assignments or break some assignments.
Now I don't understand, sorry. :-) UTF8String = type AnsiString(CP_UTF8), is there another string type with CP_UTF8? What is the definition of "string" in cpstrnew? AnsiString(CP_ACP)? http://wiki.freepascal.org/FPC_Unicode_support does not answer the question AFAIK. Hmm, I checked the Lazarus source, it seems I was wrong with the assumption that Lazarus uses "UTF8String" everywhere, it uses "String" instead, correct? Example: type TTranslateString = type String; TCaption = TTranslateString; TControl = class(TLCLComponent) [...] property Text: TCaption read GetText write SetText; TCustomEdit = class(TWinControl) [...] property SelText: String read GetSelText write SetSelText; Martin -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus