On Thu, Oct 21, 2010 at 1:41 AM, Zaher Dirkey <parm...@gmail.com> wrote:

> How to get the real length of WideString variable.
>
>
Hmm, I think i found my problem but not understand it, i used Lazarus as
editor to write the code

var
  ws: widestring;
begin
  ws:= 'زاهر';
  Label3.Caption := inttostr(length(ws));
//= 8

It is different with

  ws:= UTF8Decode('زاهر');
  Label3.Caption := inttostr(length(ws));
//= 4


-- 
Zaher Dirkey
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to