读取数据库中文乱码问题解决

  1. Cursor result=...;//实例化一个Currsor对象
  2. byte [] val = result.getBlob(1); 
  3. String question =null
  4. try { 
  5.       question = new String(val,"utf-8"); 
  6. catch (UnsupportedEncodingException e) { 
  7.        // TODO Auto-generated catch block 
  8.        e.printStackTrace(); 
  9.        } 

上面的question就不是乱码了。

posted @ 2012-05-10 13:04  First_Wolf  阅读(281)  评论(0编辑  收藏  举报