Delphi OCREngine=2,'language= cht Error

var
IdHTTP1: TIdHTTP;
MPData: TIdMultiPartFormDataStream;
JsonObject: TJSONObject;
JSonValue: TJSONValue;
sResponse: string;
sValue: string;
begin
try
IdHTTP1 := TIdHTTP.Create(nil);
IdHTTP1.Response.CharSet := ‘ANSI’;
IdHTTP1.Request.ContentType := ‘application/x-www-form-urlencoded’;

MPData := TIdMultiPartFormDataStream.Create;
MPData.AddFile('file', 'D:\996.jpg', 'image/jpg');
MPData.AddFormField('apikey', 'K81787167488957');
MPData.AddFormField('language', 'cht');
MPData.AddFormField('OCREngine','2');
MPData.AddFormField('isOverlayRequired', 'False');

sResponse := IdHTTP1.Post('https://api.ocr.space/parse/image', MPData);
JsonObject := TJSONObject.Create;
JsonValue := JsonObject.ParseJSONValue(sResponse);
showmessage(sResponse);
JsonValue:=(JsonValue as TJSONObject).Get('ParsedResults').JSONValue;

if (JsonValue is TJSONArray) then
  sValue := ((JsonValue as TJSONArray).Items[0] as TJSonObject).Get('ParsedText').JSONValue.Value;;
Memo1.Lines.Add(sValue);

finally
IdHTTP1.Free;
MPData.Free;
JsonObject.Free;
end;
end;

Request:
{“OCRExitCode”:99,“IsErroredOnProcessing”:true,“ErrorMessage”:[“Value for parameter ‘language’ is invalid”],“ProcessingTimeInMilliseconds”:“0”}

Workaround for now: Simply use OCREngine=5 as parameter.

Starting with tomorrow, OCREngine=2 will support Chinese, too!

thx, now the issue with Chinese characters has been resolved by setting OCREngine=2