[fpc-devel] UTF8 RTL

Marco van de Voort marcov at stack.nl
Sun Nov 23 17:46:35 CET 2014


In our previous episode, Michael Van Canneyt said:
> > To make things clear:
> > I meant in the way Mattias proposed, continueing making the default
> > "string" type utf8 on Windows. Utf8string is fine, but limited.
> >
> > That basically perpetuates the current hack, just slightly more elegant.
> 
> I don't know about that.
> 
> It is a perfectly valid solution to choose UTF-8 as the unicode encoding
> of choice.

So now we support changing defaultsystemcodepage formally by endusers? I was
not made aware of that.

And aside from formal status, that is IMHO a hack, and an incompatible (to
both old and new delphi) to start with.

> Now at least the compiler makes this a more viable decision. 
> So from this point on, I would no longer speak of a "hack".

It moves removes the conversions from a few RTL routines, but keeps the
"insert conversion here" barrier to all other interfacing to the system
firmly intact. And I already mentioned it is incompatible.

I assume this will also make default I/O utf8 etc, which makes no sense.
 
> >> That was simply impossible prior to the work of Jonas and others.
> >
> > It is certainly progress, and hopefully a start on at least removing the
> > OS specific aspects of Lazarus *utf8 routines.
> 
> Fully agreed.

(I would suggest keeping them for now, just make them simple codepage
wrappers in case the defaultsystemcodepage doesnt' work out).



More information about the fpc-devel mailing list