请有人帮助我,我尝试从json文件中读取阿拉伯字符串
我使用它的代码,我尝试阅读多行阿拉伯语
public String loadJSONFromAsset() {
String json = null;
try {
InputStream is = getAssets().open("horo_scop.txt");
int size = is.available();
byte[] buffer = new byte[size];
is.read(buffer);
is.close();
json = new String(buffer, "UTF_8");
System.out.println("horo json file " + json);
} catch (IOException ex) {
ex.printStackTrace();
return null;
}
return json;
}
它打印阿拉伯语就像“????? ???”
我该如何解决呢?