[fpc-devel] Is calling the Windows Unicode APIs really faster than the ANSI API's?

Michael Schnell mschnell at lumino.de
Mon Sep 29 10:31:10 CEST 2008


>> That obviously is the reason why Turbo - Delphi uses UCS-2 (16 bit)
>> instead of OF UTF-8 or UTF-16 for WideStrings (and WideChar is a 16
>> bit (UCS-2) value).
>>     
>
> You didn't read  http://www.jacobthurman.com/?p=30 , did you?
>   
They are talking about Delphi 2009, of which I don't have any 
information at all (and don't intend to bother with until there is a 
free "Turbo" version of if).

I just talked about the current free "Turbo Delphi" version which 
obviously uses UCS-2 (plain 16 bits) and not any UTF (variable size) 
coding.

As discussed in the messages here, any UTF coding would result in a huge 
overhead e.g. when doing something like s[4] := c; (s: WideString; c: 
WideChar) as the (potentially huge) tail of the string would need to be 
moved around according to the different sizes of the codes of the 
previous s[4] and c.

-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20080929/695f360e/attachment.html>


More information about the fpc-devel mailing list