[fpc-devel] utf-8 package in Free Pascal

Marco van de Voort marcov at stack.nl
Mon Oct 3 12:40:54 CEST 2011


In our previous episode, Felipe Monteiro de Carvalho said:
> 
> Not really. One can write a non-visual library which uses utf8string
> as its main string type, why not? But the RTL is not adequate for
> utf8string projects

True, because we never planned to have support for such utf8 only libraries
in the first place. 

> and will still not be after the Unicode RTL is
> completed.

I don't see why not.

> This is the case of fpvectorial and fpspreadsheet for example. If
> there is no fpc package with UTF-8 routines then it becomes impossible
> to write utf-8 non-visual packages which do not depend on the LCL.

> FPSpreadsheet already contains code copied from the LCL utf-8
> routines, I want to stop this multiplication of code copies and unify
> all routines in one base place, which logically should be in Free
> Pascal.

Then factor out the relevant LCL independent stuff to an external project.

If it is non visual, it doesn't automatically mean it should go into FPC.
 
> > till they are superceded in 2.8 by proper unicode support.
> 
> The Unicode RTL is not satisfactory for utf-8 projects. One cannot
> seriously expect to be able to write a project which uses utf8string
> if you don't even have a utf-8 TStringList to share between various
> libraries.

1) There is an unit ansistrings in Delphi for just that. 
2) And if you use the UTF8 spin of the unicode RTL, the default TStringlist is UTF8.



More information about the fpc-devel mailing list