Re: [fpc-pascal] Iterator for Unicode encoded strings

2016-04-28 Thread Michael Schnell
AFAIR, a member of the German Lazarus Forum implemented an iterator class for UTF8 some years ago (before there was Unicode support in fpc). -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailma

Re: [fpc-pascal] Iterator for Unicode encoded strings

2016-04-27 Thread Graeme Geldenhuys
On 2016-04-27 15:59, Michael Van Canneyt wrote: > Simply said: No. The character iterator > > Will iterate bytes or words, not characters. OK thanks. So I definitely need the IsSurrogatePair() like function then - in the case of UTF-16 encoded (UnicodeString) text. Do you know if such a function

Re: [fpc-pascal] Iterator for Unicode encoded strings

2016-04-27 Thread Michael Van Canneyt
On Wed, 27 Apr 2016, Graeme Geldenhuys wrote: Hi, This question really applies for all Unicode encodings (UTF-8, UTF-16 and UTF-32). In the modern world you simply can't use indexed access into Object Pascal strings to retrieve a "character" (loosely what you see on the screen - ignoring comb

[fpc-pascal] Iterator for Unicode encoded strings

2016-04-27 Thread Graeme Geldenhuys
Hi, This question really applies for all Unicode encodings (UTF-8, UTF-16 and UTF-32). In the modern world you simply can't use indexed access into Object Pascal strings to retrieve a "character" (loosely what you see on the screen - ignoring combining diacritics). In my own projects I have custom