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:
mattias 2009-01-06 11:20:29 +00:00
parent ce4f251804
commit eafa3fa246

View File

@ -1327,6 +1327,8 @@ var
begin
if AppNoExceptionMessages in FFlags then exit;
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 (not Terminated)
and (Self<>nil) then begin