[fpc-pascal] UTF-8 versions of Copy() and Length()
graemeg.lists at gmail.com
Sat May 19 11:31:42 CEST 2007
On 5/19/07, Daniël Mantione <daniel.mantione at freepascal.org> wrote:
> I think a utf8 unit would be usefull.
Glad you agree. I searched through the mailing list and found quite a
few people that required such function and implemented their own. So
yes, why don't we include a new unit with those functions for
everybody to use. The Lazarus project (LCLProc unit) has been tried
and tested for ages. We can create a new unit based on the functions
in there - just remove any LCL specific functions.
Seeing that the LCLProc unit has been in use for ages in Lazarus, any
chance that we can get such a unit fast-tracked and included in trunk
and fixes_2_2 branch? Ready for the next release.
It shouldn't interfere with any existing applications, because it will
be a new and separate unit. It's also been well tested in Lazarus.
So what name could we give such a unit. unicodeutils.pas? utfutils.pas?
> > The Length function is easy to get around, but the Copy, Pos ,etc
> > functions are not.
I meant not easy by inline'ing things like your Length example. The
UTF8Copy() function requires a bit more coding, that's all.
General error, hit any user to continue.
More information about the fpc-pascal