Android 读彩信的主题出现乱码,终极解决


   } int _id=2; Cursor c=getContentResolver().query(Uri.parse("content://mms"), null,"_id="+_id, null, null); if(c!=null) { c.moveToFirst(); String sub=""; sub+=c.getString(c.getColumnIndex("sub")); try { str=new String(sub.getBytes("ISO8859_1"),"utf-8"); Toast.makeText(this, str, Toast.LENGTH_LONG).show(); } catch (UnsupportedEncodingException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } c.close();

你可能感兴趣的:(Android 读彩信的主题出现乱码,终极解决)