我有一台蓝牙打印机,并且可以正常地从我的android应用程序打印英文字符,但是当我写阿拉伯字符时,其打印错误。我尝试在写入打印机时对输出流进行编码,但没有结果。这是我的代码
void sendData(){ 尝试{
// the text typed by the user
String msg = myTextbox.getText().toString();
mmOutputStream.write(msg.getBytes("ISO-8859-6"));
// tell the user data were sent
myLabel.setText("Data sent.");
} catch (Exception e) {
e.printStackTrace();
}
}