[fpc-devel] Unicode RTL
Yury Sidorov
jura at ce.blagovest.com
Thu Nov 17 11:38:22 CET 2005
From: "Marco van de Voort" <marcov at stack.nl>
>> marcov at stack.nl (Marco van de Voort) wrote:
>>
>> > > Dani?l Mantione <daniel.mantione at freepascal.org> wrote:
>> >
>> > > > > > In other words, you still need to duplicate an awfull lot of
>> > > > > > code.
>> > > > >
>> > > > > That is the same for 8bit and widestring.
>> > > >
>> > > > No, that is not true. There would be two rtls based on the same
>> > > > code.
>> > >
>> > > Can you give some examples, what parts of the RTL should change for
>> > > widestring?
>> >
>> > All typecasts to OS parts, libraries and functions.
>> > E.g. accessing mysql is now done with pchar(ansistring)
>>
>> And they should be replaced by what?
>
> Nothing. You can't. It was meant to illustrate that there is more to it
> than
> simply declaring an "tbasicstring" or so alias and fixing some internal
> routines. It will "just" mean full checking and ifdeffing of/in every part
> of the entire fpc/lazarus repository, and maintaining that, the added
> support
> burden etc.
When unicode RTL will be used with existing non-unicode applications or
libraries there will be a problems in any case.
But it does not mean that unicode RTL is not needed at all.
Unicode RTL is needed for people who want to develop unicode applications
from the beginning. In such case the developer will be aware of unicode and
will write correct code.
There is no magic solution to make unicode RTL compatible with existing apps
or libs. Unicode RTL will be an option for people who really need it.
IMHO RTL code base must be the same for ansi and unicode. To build unicode
RTL some define must be used.
Yury Sidorov.
More information about the fpc-devel
mailing list