[Lazarus] TProcess, UTF8, Windows

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Apr 15 13:33:05 CEST 2012


On Sun, 15 Apr 2012 13:00:12 +0200
Martin Schreiber <mse00000 at gmail.com> wrote:

> On Sunday 15 April 2012 12:35:08 Mattias Gaertner wrote:
> > On Sun, 15 Apr 2012 11:44:15 +0200
> >
> > Martin Schreiber <mse00000 at gmail.com> wrote:
> > > On Sunday 15 April 2012 11:32:21 Mattias Gaertner wrote:
> > > > cpstrnew is part of fpc 2.7.1 and Lazarus runs fine with it since two
> > > > months.
> > > >
> > > > The -Fcutf8 and {$codepage utf8} exists since ages.
> > >
> > > I meant the combination of -Fcutf8, cpstrnew, and the Lazarus UTF8String
> > > which should be possible in FPC trunk but is not fully tested up to now
> > > maybe.
> >
> > I'm not sure what you mean with "the Lazarus UTF8String".
> >
> > There is UTF8String = type AnsiString(CP_UTF8) defined in system.pp.
> >
> 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.
Some benchmarks could be done, but I fear it is too early for that.


Mattias




More information about the Lazarus mailing list