RapidOCR-json icon indicating copy to clipboard operation
RapidOCR-json copied to clipboard

Not in cases where the image path contains Chinese characters

Open yida-lxw opened this issue 5 months ago • 1 comments

String imageFilePath = "C:/Users/Administrator/Desktop/单层/OCR测试.png";
imageFilePath = StringUtils.convertToUnicode(imageFilePath);
System.out.println("convert to ASCII:" + imageFilePath);
String command = "F:/RapidOCR-json_v0.2.0/RapidOCR-json.exe --models=F:/RapidOCR-json_v0.2.0/models --image_path=\"" + imageFilePath + "\"";

String text = CommandExecuteUtils.executeCommand(command);
System.out.println("text-->" + text);

The idea console print as below: convert to ASCII:C:/Users/Administrator/Desktop/\u5355\u5c42/OCR\u6d4b\u8bd5.png text-->RapidOCR-json v1.1.0 OCR init completed. {"code":200,"data":"Image path dose not exist. Path: "C:/Users/Administrator/Desktop/\u5355\u5c42/OCR\u6d4b\u8bd5.png""}

So, How to solve the situation where the image path contains Chinese characters? Any help will be appreciated.

yida-lxw avatar Feb 05 '24 01:02 yida-lxw