[Lazarus] Unicode support enabled for win32 with fpc 2.2.1 and higher

Luca Olivetti luca at wetron.es
Tue Apr 22 08:58:42 CEST 2008


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?

> You can use them if you are using widestrings.

I'm not (knowingly) using widestrings, but I think the system 
function/methods I'm calling have an overloaded version that accepts 
widestrings.

Bye
-- 
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004      Fax +34 93 5883007



More information about the Lazarus mailing list