-
-
Notifications
You must be signed in to change notification settings - Fork 376
Closed
Description
example data, charset utf-8
[{"barcode":"8801062318490","company_code":"민","quantity":5,"date":"2016-03-23","kind":"1"}]
"민" is korean.
error message
[EEncodingError] No mapping for the Unicode character exists in the target multi-byte code page
> original code
function TMVCWebRequest.Body: string;
....
try
Result := InEnc.GetString(TEncoding.ANSI.GetBytes(FWebRequest.RawContent));
finally
InEnc.Free;
end
....
> my code
function TMVCWebRequest.Body: string;
....
try
SetLength(Buffer, FWebRequest.ContentLength);
FWebRequest.ReadClient(Buffer[0], FWebRequest.ContentLength);
Result := InEnc.GetString(Buffer);
finally
InEnc.Free;
end
Metadata
Metadata
Assignees
Labels
No labels