[Lazarus] Unicode support enabled for win32 with fpc 2.2.1 and higher
Vincent Snijders
vsnijders at quicknet.nl
Tue Apr 22 09:25:20 CEST 2008
Luca Olivetti schreef:
> En/na Felipe Monteiro de Carvalho ha escrit:
>> On Mon, Apr 21, 2008 at 4:27 AM, Luca Olivetti <luca at wetron.es> wrote:
>>> Answering to myself: in my copy of lazarus ("ancient" snapshot
>>> 2008-06-23)/fpc those functions are defined in wstringh.inc, *not* in
>>> LCLIntf as the wiki says, and they simply call utf8encode/utf8decode
>> You are right. They were previously in LCLIntf, but were added to the RTL.
>>
>> UTF8Encode converts from utf-16 to utf-8
>>
>> utf8decode converts from utf-8 to utf-16
>
> And AnsiToUtf8/Utf8ToAnsi simply call Utf8Encode/Utf8Decode, so they end
> up doing the same ?!?!
> Maybe the difference lies in the automatic typecasting from widestring
> to ansistring?
>
AnsiToUtf8 := Ansi -> WideString + WideString -> UTF-8.
For Ansi -> WideString the conversion utilities of the widestring manager are used.
For WideString -> UTF-8 UTF8Encode is used.
Vincent
More information about the Lazarus
mailing list