mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-24 08:02:15 +02:00
Fixed UTF8 string conversion in FPC
This commit is contained in:
parent
817e4a68ab
commit
76fc979882
@ -287,7 +287,7 @@ function CefGetDataURI(aData : pointer; aSize : integer; const aMimeType : ustri
|
||||
function ValidCefWindowHandle(aHandle : TCefWindowHandle) : boolean;
|
||||
procedure InitializeWindowHandle(var aHandle : TCefWindowHandle);
|
||||
|
||||
function GetCommandLineSwitchValue(const aKey : ustring; var aValue : ustring) : boolean;
|
||||
function GetCommandLineSwitchValue(const aKey : string; var aValue : ustring) : boolean;
|
||||
|
||||
implementation
|
||||
|
||||
@ -2399,10 +2399,10 @@ begin
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function GetCommandLineSwitchValue(const aKey : ustring; var aValue : ustring) : boolean;
|
||||
function GetCommandLineSwitchValue(const aKey : string; var aValue : ustring) : boolean;
|
||||
var
|
||||
i, TempLen : integer;
|
||||
TempKey : ustring;
|
||||
TempKey : string;
|
||||
begin
|
||||
Result := False;
|
||||
TempKey := '--' + aKey + '=';
|
||||
@ -2412,7 +2412,11 @@ begin
|
||||
while (i >= 1) do
|
||||
if (CompareText(copy(paramstr(i), 1, TempLen), TempKey) = 0) then
|
||||
begin
|
||||
{$IFDEF FPC}
|
||||
aValue := UTF8Decode(copy(paramstr(i), succ(TempLen), length(paramstr(i))));
|
||||
{$ELSE}
|
||||
aValue := copy(paramstr(i), succ(TempLen), length(paramstr(i)));
|
||||
{$ENDIF}
|
||||
Result := True;
|
||||
break;
|
||||
end
|
||||
|
@ -2,7 +2,7 @@
|
||||
"UpdateLazPackages" : [
|
||||
{
|
||||
"ForceNotify" : true,
|
||||
"InternalVersion" : 290,
|
||||
"InternalVersion" : 291,
|
||||
"Name" : "cef4delphi_lazarus.lpk",
|
||||
"Version" : "90.6.5.0"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user