[fpc-pascal] What is the size of AnsiChar

LacaK lacak at zoznam.sk
Mon Nov 5 12:55:24 CET 2012


ik  wrote / napĂ­sal(a):
> On Mon, Nov 5, 2012 at 1:18 PM, Tomas Hajny <XHajT03 at hajny.biz> wrote:
>   
>> On Mon, November 5, 2012 11:49, ik wrote:
>>
>>
>> Hello Ido,
>>
>>     
>>> As I understand, AnsiString and AnsiChar contain the environment type
>>> of string (it can be ISO8859x, utf-8 etc...).
>>> If that so, how can I know the size (in bytes) of AnsiChar ?
>>>       
>> As far as I understand it, AnsiChar is always 1 byte, i.e. it cannot hold
>> (whole) multi-byte encoded characters like UTF-8 (at least at the moment;
>> I'm not sure if this is supposed to stay like that also in the future or
>> not).
>>     
>
> Thank you
>
>   
You can also try (in 2.7) : function StringElementSize(const S : 
RawByteString): Word;
-Laco.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20121105/81145118/attachment.html>


More information about the fpc-pascal mailing list