En/na [EMAIL PROTECTED] ha escrit:
* WideString allows indexed "[]" accessing individual chars.
This does not seem to be correct. I read that utf16 can be 4 byte long..
Then calculation is needed sometimes...
Unless you're dealing with klingon and ancient languages, I think you
can assume that for 99.99% of currently spoken languages every character
will be exactly 2 bytes long. There's a risk of having some character
with more that 2 bytes but it is a small risk.
With utf-8 the risk is bigger, so you have always to traverse the string
if you need access to a specific character index.
--
Luca
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives