-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Proposal for modify middleware to no encoding above 127 ASCII char code:
var
procedure Middleware(Req: THorseRequest; Res: THorseResponse; Next: {$IF DEFINED(FPC)}TNextProc{$ELSE}TProc{$ENDIF});
...
ops: TJSONValue.TJsonOutputOptions;
begin
...
if SameText(Charset, 'utf-8') then
ops := [TJSONValue.TJSONOutputOption.EncodeBelow32]
else
ops := [TJSONValue.TJSONOutputOption.EncodeBelow32, TJSONValue.TJSONOutputOption.EncodeAbove127];
Res.RawWebResponse.Content := TJSONValue(Res.Content).ToJSON(ops);
...
end;
Or maybe some other configuration for this? If I want to response with utf-8 charset, why can't use utf-8 charset as is in json?
(this feature can support only by D12 (or some lower, but above D10).
Metadata
Metadata
Assignees
Labels
No labels