Skip to content

Instantly share code, notes, and snippets.

@mr-wind
Created April 28, 2016 17:05
Show Gist options
  • Save mr-wind/85c3488aca0a21dab871d52d4f497a82 to your computer and use it in GitHub Desktop.
Save mr-wind/85c3488aca0a21dab871d52d4f497a82 to your computer and use it in GitHub Desktop.
转码
String title = null;
try {
title = new String(i.getTitle().getBytes("ISO-8859-1"), "UTF-8");//转码
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
@mr-wind
Copy link
Author

mr-wind commented Apr 28, 2016

用于处理服务器传来的数据编码,这样就不会显示不出来中文了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment