[fpc-pascal] Real length of WideString
Marco van de Voort
marcov at stack.nl
Thu Oct 21 09:32:03 CEST 2010
In our previous episode, Graeme Geldenhuys said:
>
> Length() returns number of bytes, not number of characters. The incorrect
> assumption was made back in Delphi (before unicode support).
Afaik before unicode.
Delphi 3 (which introduced widestrings) was released August 5th, 1997.
Unicode 3.0 that adds surrogate points was only released in 2000.
Note that there was no other way anyway, since parsing characters for length
would be horribly slow.
More information about the fpc-pascal
mailing list