我用cdma modem发送短信,怎么调整编码格式都是乱码!!!到底该怎么做啊!求dx帮忙!!我的代码如下:
 String Msg="AT*SkT*MOREQ=0,"+TelNum+",,4098,";
     out.write(Msg.getBytes());  //发送命令
    
     char[] c=sms.toCharArray();//短信内容
     for(int i=0;i<c.length;i++)
     {
      out.write((int)c[i]);     //用方式1往串口里面写
     }
     for(int i=0;i<c.length;i++)
     {     
     out.write((byte)c[i]);    //用方式2往串口里面写
     }
     for(int i=0;i<c.length;i++)
     { 
     out.write(c[i]);           //用方式3往串口里面写
     }
    out.write("\r".getBytes());
//上面几行代码是用java写的,时间紧没有翻译成delphi,我想大家应该看的明白。