[fpc-devel] Unicode RTL

Daniël Mantione daniel.mantione at freepascal.org
Thu Nov 17 08:36:27 CET 2005



Op Wed, 16 Nov 2005, schreef Mattias Gaertner:

> I don't understand, why you connect UTF8 with 'ignorant of MBCS'.
> UCS-2 can be used as ignorant as UTF8.
> Even UCS-4 and UTF32 will not solve all problems. Think about arabic RTL.

Sure. I am not against UTF-8 or something (if you got that impression). 
What I did note though is that adding UTF-8 (or widestring, it doesn't 
matter) would mean doubling a lot of code, while with a separate RTL 
would prevent, there would be single code that can be compiled for 
multiple targets.

> > 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.

> > What convinced me two rtl's might be a better choice, is that many of the 
> > source code remains intact and does not need to be duplicated. New code 
> > could take advantage immedeately. The decision wether the code is going to
> > be used in an 8-bit environment (i.e. MS-DOS) and will be 8-bit, or in a 
> > Unicode environment (i.e. Windows NT) and will be 16-bit a character, is 
> > solved by a few ifdefs. There won't even be any overhead on the MS-DOS 
> > executables (allthough the programmer can use widestrings if he wishes 
> > so).
> 
> Please: No two RTLs.

A separate RTL is not my proposal, but the idea isn't that stupid.

I am not going to push anything.

Daniël


More information about the fpc-devel mailing list