mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-04-17 06:57:13 +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;
|
function ValidCefWindowHandle(aHandle : TCefWindowHandle) : boolean;
|
||||||
procedure InitializeWindowHandle(var aHandle : TCefWindowHandle);
|
procedure InitializeWindowHandle(var aHandle : TCefWindowHandle);
|
||||||
|
|
||||||
function GetCommandLineSwitchValue(const aKey : ustring; var aValue : ustring) : boolean;
|
function GetCommandLineSwitchValue(const aKey : string; var aValue : ustring) : boolean;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -2399,10 +2399,10 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GetCommandLineSwitchValue(const aKey : ustring; var aValue : ustring) : boolean;
|
function GetCommandLineSwitchValue(const aKey : string; var aValue : ustring) : boolean;
|
||||||
var
|
var
|
||||||
i, TempLen : integer;
|
i, TempLen : integer;
|
||||||
TempKey : ustring;
|
TempKey : string;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
TempKey := '--' + aKey + '=';
|
TempKey := '--' + aKey + '=';
|
||||||
@ -2412,7 +2412,11 @@ begin
|
|||||||
while (i >= 1) do
|
while (i >= 1) do
|
||||||
if (CompareText(copy(paramstr(i), 1, TempLen), TempKey) = 0) then
|
if (CompareText(copy(paramstr(i), 1, TempLen), TempKey) = 0) then
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF FPC}
|
||||||
|
aValue := UTF8Decode(copy(paramstr(i), succ(TempLen), length(paramstr(i))));
|
||||||
|
{$ELSE}
|
||||||
aValue := copy(paramstr(i), succ(TempLen), length(paramstr(i)));
|
aValue := copy(paramstr(i), succ(TempLen), length(paramstr(i)));
|
||||||
|
{$ENDIF}
|
||||||
Result := True;
|
Result := True;
|
||||||
break;
|
break;
|
||||||
end
|
end
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"UpdateLazPackages" : [
|
"UpdateLazPackages" : [
|
||||||
{
|
{
|
||||||
"ForceNotify" : true,
|
"ForceNotify" : true,
|
||||||
"InternalVersion" : 290,
|
"InternalVersion" : 291,
|
||||||
"Name" : "cef4delphi_lazarus.lpk",
|
"Name" : "cef4delphi_lazarus.lpk",
|
||||||
"Version" : "90.6.5.0"
|
"Version" : "90.6.5.0"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user