On Wednesday 30 July 2008 09.04:02 Graeme Geldenhuys wrote: > Hi, > > Has anybody already implemented the string utility functions like > Length, Pos, Delete, Copy, Insert etc. that works with UTF-16. I'm not > interested in UCS2 only support, I want full UTF-16 support. > > I'm willing to implement those, but why reinvent the wheel when > somebody already did it before... :) > Use the normal FPC widestring routines. There is no difference between handling of UCS2 or utf-16 except that ucs2string[<n>] always returns a codepoint. Pos() works for UCS2 and utf-16. If you must work with character cells of the whole Unicode range which are addressed by an index, you should convert to an array of ucs4char before processing. Please note that a glyph often is composed by more than one codepoint.
Martin _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal