[Lazarus] -FcUTF8,-dEnableUTF8 create problem

luiz americo pereira camara luizmed at oi.com.br
Thu Feb 19 12:02:05 CET 2015


2015-02-19 5:30 GMT-03:00 FreeMan <freeman35 at delphiturkiye.com>:

>  osx fpc & lazarus svn QT x64
> my project's Compiler options has
> -FcUTF8
> -dEnableUTF8
>
> this is my code: this code work normal without ut8 params
>
> const
>   WIN_EXE: String = 'MZ';
>   LINUX_EXE: String = #127 + 'ELF';
> var
>   wFileStr: TFileStream;
>   ar: array[0..4] of byte;
>   ExecType: char;
>  wProgram := ParamStrUTF8(0);
>


What type is wParam?

Can you check the return value of the below procedure when passing wParam
with and without -FcUTF8?

function StrToHex(const S: RawByteString): String;
var
  i: Integer;
begin
  Result := '';
  if S = '' then
    Exit;
  for i := 1 to Length(S) do
  begin
    Result := Result + IntToHex(Byte(S[i]), 0);
  end;
end;

Luiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150219/9cea9720/attachment-0003.html>


More information about the Lazarus mailing list