[fpc-devel] Controlling the output of the widestring manager

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Dec 4 23:47:45 CET 2007


Marc Weustink wrote on di, 04 dec 2007:

> Jonas Maebe wrote:
>>
>> Are widestrings supposed to be UTF-16 or UCS-2 on unix? Currently   
>> they are UTF-16, but a lot of routines seem to assume UCS-2 (like   
>> the generic WideStringToUCS4String, and the unix   
>> Lower/UpperWideString)
>
> It is a bit confusing, but for a while now UCS-2 uses UTF-16 as
> encoding. So even UCS-2 is nowadays not fixed length.
>
> I guess you mean the UCS-2 standard from the times that each char   
> was 2 bytes.

Yes, I did. Thanks for the clarification, I'll fix everything to work  
with (variable length) UTF-16 then. Or does Windows still use fixed  
length UCS-2? And if so, does this UCS-2 use the code points which are  
reserved for surrogate pairs in UTF-16?


Jonas

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the fpc-devel mailing list