[fpc-devel] Unicode support (yet again)
Luiz Americo Pereira Camara
luizmed at oi.com.br
Sun Sep 18 22:51:24 CEST 2011
On 18/9/2011 17:04, Hans-Peter Diettrich wrote:
> Luiz Americo Pereira Camara schrieb:
>
>>> Can you give me a link? I checked the XE documentation and RTL, and
>>> could not find that RawByteString can hold UTF-16, and my test
>>> confirms that:
>>>
>>
>> http://edn.embarcadero.com/article/38980
>>
>> You may read also:
>>
>> http://www.micro-isv.asia/2008/08/using-rawbytestring-effectively/
>
> Thanks, but that's nothing new to me in general, and the RawByteString
> handling doesn't work as documented.
procedure ShowCodePage(const S: RawByteString);
begin
Form1.Caption := IntToStr(StringCodePage(S));
end;
Strange
What value you get passing and UTF8 and UTF16?
According to that site you should get 65001 and 1200
You may try also with UTF16 and UTF8 it should implicitly convert to
UnicodeString
procedure ShowWithAnyCodePage(const S: RawByteString);
begin
Form1.Caption := S;
end;
Luiz
end;
More information about the fpc-devel
mailing list