mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 09:19:45 +02:00
fcl-web: better error message conversion
This commit is contained in:
parent
f29156340a
commit
0a0f213b8b
@ -1645,13 +1645,13 @@ begin
|
||||
ErrMsg:=IntToStr(Err);
|
||||
if woSendErrClosesConn in Options then
|
||||
begin
|
||||
if CP_ACP=CP_UTF8 then begin
|
||||
SetLength(Data, length(ErrMsg));
|
||||
Move(ErrMsg[1],Data[0],length(Data));
|
||||
end else begin
|
||||
SetLength(Data, 0);
|
||||
Data.Append(TEncoding.UTF8.GetBytes(UnicodeString(ErrMsg)));
|
||||
end;
|
||||
{$IF SIZEOF(CHAR)=2}
|
||||
SetLength(Data, 0);
|
||||
Data.Append(TEncoding.UTF8.GetBytes(UnicodeString(ErrMsg)));
|
||||
{$ELSE}
|
||||
SetLength(Data, length(ErrMsg));
|
||||
Move(ErrMsg[1],Data[0],length(Data));
|
||||
{$ENDIF}
|
||||
DispatchEvent(ftClose, nil, Data);
|
||||
end
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user