[fpc-pascal] UTF-8 versions of Copy() and Length()
graemeg.lists at gmail.com
Sat May 19 10:58:09 CEST 2007
On 5/19/07, Daniël Mantione <daniel.mantione at freepascal.org> wrote:
> > Does FPC have UTF-8 versions of the Copy() and Length() functions?
> They don't exist. FPC has been designed to either use the system encoding
> (which can be utf8). In this case, the string routines from sysutils do
> what you want. The other option is to use widestrings;
> length(utf8decode(s)) will return the length of an utf-8 string.
Sorry, I'm very new to Unicode support. Wouldn't it be useful to have
UTF-8 and UTF-16 (and all the other encodings) functions in FPC? For
example the Lazarus LCL (LCLProc unit) has loads of such functions.
The Length function is easy to get around, but the Copy, Pos ,etc
functions are not.
General error, hit any user to continue.
More information about the fpc-pascal