[Lazarus] String vs WideString

Martin Schreiber mse00000 at gmail.com
Fri Aug 18 13:45:39 CEST 2017


On Friday 18 August 2017 13:02:44 Michael Schnell via Lazarus wrote:
> On 18.08.2017 11:01, Graeme Geldenhuys via Lazarus wrote:
> > On 2017-08-18 09:16, Tony Whyman via Lazarus wrote:
> >> Damn, should remember never to copy and paste from Wikipedia!
> >
> > Or simply use "plain text" emails
>
> To explain my mail above in plain Text:
>
> A 32 bit Unicode needs two UTC-16 codes when it's greater than 2^15 (and
> not 2^16) , because bit 15 in UTF-16 is used to denote that another word
> follows.
>
Not exactly. ;-)
Please read the utf-16 specification again. The surrogate pair first code unit 
range is 0xDC00..0xDFFF. The rest can be used to encode code points of the 
BMP. There are no valid code points in range 0xDC00..0xDFFF.
https://en.wikipedia.org/wiki/UTF-16

Martin


More information about the Lazarus mailing list