mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 09:59:20 +02:00
LCL: if exception message contains invalid UTF-8 chars, assume it is ansi and convert, from Joost van der Sluis, bug #12271 #12741
git-svn-id: trunk@18165 -
This commit is contained in:
parent
ce4f251804
commit
eafa3fa246
@ -1327,6 +1327,8 @@ var
|
|||||||
begin
|
begin
|
||||||
if AppNoExceptionMessages in FFlags then exit;
|
if AppNoExceptionMessages in FFlags then exit;
|
||||||
Msg := E.Message;
|
Msg := E.Message;
|
||||||
|
if FindInvalidUTF8Character(pchar(Msg),length(Msg), False) > 0 then
|
||||||
|
Msg := AnsiToUtf8(Msg);
|
||||||
if (Msg <> '') and (Msg[length(Msg)] <> '.') then Msg := Msg + '.';
|
if (Msg <> '') and (Msg[length(Msg)] <> '.') then Msg := Msg + '.';
|
||||||
if (not Terminated)
|
if (not Terminated)
|
||||||
and (Self<>nil) then begin
|
and (Self<>nil) then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user