FIX: SevenZip - MessageBox text encoding

(cherry picked from commit c13c40bd32)
This commit is contained in:
Alexander Koblov 2022-08-15 22:00:21 +03:00
commit 5deb4e99e3
3 changed files with 6 additions and 6 deletions

View file

@ -347,7 +347,7 @@ begin
else begin
AMessage := SysErrorMessage(GetLastError) + LineEnding;
AMessage += rsSevenZipSfxNotFound + LineEnding + SfxModule;
MessageBox(0, PAnsiChar(AMessage), nil, MB_OK or MB_ICONERROR);
MessageBoxW(0, PWideChar(UTF8ToUTF16(AMessage)), nil, MB_OK or MB_ICONERROR);
Exit(E_NO_FILES);
end;
end;
@ -631,7 +631,7 @@ begin
on E: Exception do
begin
ReturnValue:= GetArchiveError(E);
MessageBox(0, PAnsiChar(E.Message), nil, MB_OK or MB_ICONERROR);
MessageBoxW(0, PWideChar(UTF8ToUTF16(E.Message)), nil, MB_OK or MB_ICONERROR);
end;
end;
Terminate;

View file

@ -432,7 +432,7 @@ begin
SetArchiveCustom(AJclArchive, Index);
except
on E: Exception do
Messagebox(0, PAnsiChar(E.Message), nil, MB_OK or MB_ICONERROR);
MessageBoxW(0, PWideChar(UTF8ToUTF16(E.Message)), nil, MB_OK or MB_ICONERROR);
end;
Exit;
@ -467,7 +467,7 @@ begin
end;
except
on E: Exception do
MessageBox(0, PAnsiChar(E.Message), nil, MB_OK or MB_ICONERROR);
MessageBoxW(0, PWideChar(UTF8ToUTF16(E.Message)), nil, MB_OK or MB_ICONERROR);
end;
end;
@ -497,7 +497,7 @@ begin
end;
except
on E: Exception do
MessageBox(0, PAnsiChar(E.Message), nil, MB_OK or MB_ICONERROR);
MessageBoxW(0, PWideChar(UTF8ToUTF16(E.Message)), nil, MB_OK or MB_ICONERROR);
end;
end;

View file

@ -6611,7 +6611,7 @@ begin
except
on E: Exception do
begin
case MessageBox(0, PAnsiChar(E.Message), nil, MB_ABORTRETRYIGNORE or MB_ICONERROR) of
case MessageBoxW(0, PWideChar(UTF8Decode(E.Message)), nil, MB_ABORTRETRYIGNORE or MB_ICONERROR) of
IDABORT: Exit(E_ABORT);
IDIGNORE:
begin