In our previous episode, Michael Schnell said:
> > It's no different then UTF-16 if you want to do it properly. In both you
> > have to look out for surrogates.
> >   
> Is UTF-16 Widestring in FPC (and Delphi 200x ? ) not done just ignoring 
> the surrogates ? 

No different as UTF-8 in principle. Base routines keep surrogate pairs
intact if you don't use them wrongly.

>(AFAI understand, a Widechar is just 16 bit, it would 

And a char is 8 -bit the granularity of UTF-8 without surrogates. IOW it is
orthogonal.

> need to be 32 bit if surrogates were allowed in Widestrings).

No it doesn't, Windows supports surrogates, and so does afaik Tiburon. It is
just that they chose the granularity of [] to be the granularity of the
encoding rather than char based.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to