On Fri, 05 Oct 2007 13:14:23 +0200
Luca Olivetti <[EMAIL PROTECTED]> wrote:

> 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.

True. 
Programmers must decide, whether their programs can take the risk, not
the LCL. And who knows, how unicode will change in future?


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to