亂碼簡訊解碼

來源:互聯網
上載者:User

曾經受到過一個亂碼SMS,於是通過手機郵箱把這個簡訊轉寄到一個EMAIL地址上,結果如下:

BEGIN:VNOTE  VERSION:1.1  BODY;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=E6=83=B3=E8=BF=87=E9=95=BF=E5=  =A4=A7=E4=BA=86=E7=9A=84=E6=AD=A3=E5=B8=B8=E7=94=9F=E6=B4=BB,=E5=AF=B9=E6=  =88=91=E4=BB=AC=E5=8D=B4=E5=A4=AA=E9=9A=BE.=E8=87=B3=E4=BB=8A=E4=BD=A0=E5=  =92=8C=E6=88=91=E4=BB=8D=E6=B4=BB=E5=9C=A8=E7=88=B6=E6=AF=8D=E5=AE=B6=E9=87=  =8C=E6=B2=BF=E7=BB=AD=E7=9D=80=E4=BA=8C=E5=8D=81=E5=85=AB=E5=B9=B4=E6=9D=A5=  =E7=9A=84=E8=A7=92=E8=89=B2.=E3=80=80=E7=9A=84=E7=A1=AE=E8=B6=8A=E6=9D=A5=  =E8=B6=8A=E7=81=B0=E5=BF=83=E4=BA=86,=E9=80=8F=E6=94=AF=E4=BA=86=E7=AD=89=  =E5=BE=85.=E3=80=80=E5=8E=8C=E5=80=A6=E4=BA=86=E5=92=8C=E4=BB=96=E4=BA=BA=  =E7=9A=84=E4=BA=89=E6=89=A7,=E4=B9=9F=E7=9C=9F=E7=9A=84=E4=B8=8D=E6=84=BF=  =E6=84=8F=E5=86=8D=E5=8B=89=E5=BC=BA=E4=BD=A0=E5=81=9A=E4=BD=A0=E4=B8=8D=E6=  =83=85=E6=84=BF=E5=92=8C=E5=BE=88=E8=89=B0=E9=9A=BE=E5=BE=97=E9=80=89=E6=8B=  =A9.=0A=E8=BF=99=E9=87=8C=E6=88=91=E6=B2=A1=E6=9C=89=E7=BE=8E=E5=A5=BD=E5=  =9B=9E=E5=BF=86,=E4=B9=9F=E8=AE=B8=E7=9C=9F=E7=9A=84=E5=93=AA=E5=A4=A9=E5=  =B0=B1=E7=A6=BB=E5=BC=80=E4=BA=86.=E3=80=80  DCREATED:20060717T122207Z  LAST-MODIFIED:20060717T122207Z  CLASS:PUBLIC  X-IRMC-LUID:000000010030  END:VNOTE  

 很明顯,是經過UTF-8編碼得:於是通過替換轉換解碼:

  byte[] s={(byte) 0xE6,(byte) 0x83,(byte) 0xB3,(byte) 0xE8,(byte) 0xBF,(byte) 0x87,(byte) 0xE9,(byte) 0x95,(byte) 0xBF,(byte) 0xE5
    ,(byte) 0xA4,(byte) 0xA7,(byte) 0xE4,(byte) 0xBA,(byte) 0x86,(byte) 0xE7,(byte) 0x9A,(byte) 0x84,(byte) 0xE6,(byte) 0xAD,(byte) 0xA3,(byte) 0xE5,(byte) 0xB8,(byte) 0xB8,(byte) 0xE7,(byte) 0x94,(byte) 0x9F,(byte) 0xE6,(byte) 0xB4,(byte) 0xBB,(byte) 0xE5,(byte) 0xAF,(byte) 0xB9,(byte) 0xE6
    ,(byte) 0x88,(byte) 0x91,(byte) 0xE4,(byte) 0xBB,(byte) 0xAC,(byte) 0xE5,(byte) 0x8D,(byte) 0xB4,(byte) 0xE5,(byte) 0xA4,(byte) 0xAA,(byte) 0xE9,(byte) 0x9A,(byte) 0xBE,(byte) 0xE8,(byte) 0x87,(byte) 0xB3,(byte) 0xE4,(byte) 0xBB,(byte) 0x8A,(byte) 0xE4,(byte) 0xBD,(byte) 0xA0,(byte) 0xE5
    ,(byte) 0x92,(byte) 0x8C,(byte) 0xE6,(byte) 0x88,(byte) 0x91,(byte) 0xE4,(byte) 0xBB,(byte) 0x8D,(byte) 0xE6,(byte) 0xB4,(byte) 0xBB,(byte) 0xE5,(byte) 0x9C,(byte) 0xA8,(byte) 0xE7,(byte) 0x88,(byte) 0xB6,(byte) 0xE6,(byte) 0xAF,(byte) 0x8D,(byte) 0xE5,(byte) 0xAE,(byte) 0xB6,(byte) 0xE9,(byte) 0x87
    ,(byte) 0x8C,(byte) 0xE6,(byte) 0xB2,(byte) 0xBF,(byte) 0xE7,(byte) 0xBB,(byte) 0xAD,(byte) 0xE7,(byte) 0x9D,(byte) 0x80,(byte) 0xE4,(byte) 0xBA,(byte) 0x8C,(byte) 0xE5,(byte) 0x8D,(byte) 0x81,(byte) 0xE5,(byte) 0x85,(byte) 0xAB,(byte) 0xE5,(byte) 0xB9,(byte) 0xB4,(byte) 0xE6,(byte) 0x9D,(byte) 0xA5
    ,(byte) 0xE7,(byte) 0x9A,(byte) 0x84,(byte) 0xE8,(byte) 0xA7,(byte) 0x92,(byte) 0xE8,(byte) 0x89,(byte) 0xB2,(byte) 0xE3,(byte) 0x80,(byte) 0x80,(byte) 0xE7,(byte) 0x9A,(byte) 0x84,(byte) 0xE7,(byte) 0xA1,(byte) 0xAE,(byte) 0xE8,(byte) 0xB6,(byte) 0x8A,(byte) 0xE6,(byte) 0x9D,(byte) 0xA5
    ,(byte) 0xE8,(byte) 0xB6,(byte) 0x8A,(byte) 0xE7,(byte) 0x81,(byte) 0xB0,(byte) 0xE5,(byte) 0xBF,(byte) 0x83,(byte) 0xE4,(byte) 0xBA,(byte) 0x86,(byte) 0xE9,(byte) 0x80,(byte) 0x8F,(byte) 0xE6,(byte) 0x94,(byte) 0xAF,(byte) 0xE4,(byte) 0xBA,(byte) 0x86,(byte) 0xE7,(byte) 0xAD,(byte) 0x89
    ,(byte) 0xE5,(byte) 0xBE,(byte) 0x85,(byte) 0xE3,(byte) 0x80,(byte) 0x80,(byte) 0xE5,(byte) 0x8E,(byte) 0x8C,(byte) 0xE5,(byte) 0x80,(byte) 0xA6,(byte) 0xE4,(byte) 0xBA,(byte) 0x86,(byte) 0xE5,(byte) 0x92,(byte) 0x8C,(byte) 0xE4,(byte) 0xBB,(byte) 0x96,(byte) 0xE4,(byte) 0xBA,(byte) 0xBA
    ,(byte) 0xE7,(byte) 0x9A,(byte) 0x84,(byte) 0xE4,(byte) 0xBA,(byte) 0x89,(byte) 0xE6,(byte) 0x89,(byte) 0xA7,(byte) 0xE4,(byte) 0xB9,(byte) 0x9F,(byte) 0xE7,(byte) 0x9C,(byte) 0x9F,(byte) 0xE7,(byte) 0x9A,(byte) 0x84,(byte) 0xE4,(byte) 0xB8,(byte) 0x8D,(byte) 0xE6,(byte) 0x84,(byte) 0xBF
    ,(byte) 0xE6,(byte) 0x84,(byte) 0x8F,(byte) 0xE5,(byte) 0x86,(byte) 0x8D,(byte) 0xE5,(byte) 0x8B,(byte) 0x89,(byte) 0xE5,(byte) 0xBC,(byte) 0xBA,(byte) 0xE4,(byte) 0xBD,(byte) 0xA0,(byte) 0xE5,(byte) 0x81,(byte) 0x9A,(byte) 0xE4,(byte) 0xBD,(byte) 0xA0,(byte) 0xE4,(byte) 0xB8,(byte) 0x8D,(byte) 0xE6
    ,(byte) 0x83,(byte) 0x85,(byte) 0xE6,(byte) 0x84,(byte) 0xBF,(byte) 0xE5,(byte) 0x92,(byte) 0x8C,(byte) 0xE5,(byte) 0xBE,(byte) 0x88,(byte) 0xE8,(byte) 0x89,(byte) 0xB0,(byte) 0xE9,(byte) 0x9A,(byte) 0xBE,(byte) 0xE5,(byte) 0xBE,(byte) 0x97,(byte) 0xE9,(byte) 0x80,(byte) 0x89,(byte) 0xE6,(byte) 0x8B
    ,(byte) 0xA9,(byte) 0x0A,(byte) 0xE8,(byte) 0xBF,(byte) 0x99,(byte) 0xE9,(byte) 0x87,(byte) 0x8C,(byte) 0xE6,(byte) 0x88,(byte) 0x91,(byte) 0xE6,(byte) 0xB2,(byte) 0xA1,(byte) 0xE6,(byte) 0x9C,(byte) 0x89,(byte) 0xE7,(byte) 0xBE,(byte) 0x8E,(byte) 0xE5,(byte) 0xA5,(byte) 0xBD,(byte) 0xE5
    ,(byte) 0x9B,(byte) 0x9E,(byte) 0xE5,(byte) 0xBF,(byte) 0x86,(byte) 0xE4,(byte) 0xB9,(byte) 0x9F,(byte) 0xE8,(byte) 0xAE,(byte) 0xB8,(byte) 0xE7,(byte) 0x9C,(byte) 0x9F,(byte) 0xE7,(byte) 0x9A,(byte) 0x84,(byte) 0xE5,(byte) 0x93,(byte) 0xAA,(byte) 0xE5,(byte) 0xA4,(byte) 0xA9,(byte) 0xE5
    ,(byte) 0xB0,(byte) 0xB1,(byte) 0xE7,(byte) 0xA6,(byte) 0xBB,(byte) 0xE5,(byte) 0xBC,(byte) 0x80,(byte) 0xE4,(byte) 0xBA,(byte) 0x86,(byte) 0xE3,(byte) 0x80,(byte) 0x80 };
  
  try {
   String str = new String(s,"UTF-8");
   System.out.println(str);
  } catch (UnsupportedEncodingException e) {

   e.printStackTrace();
  }

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.