Last active
June 22, 2016 06:15
-
-
Save langjun/8046618e3690e8de0c9df623a93e88e5 to your computer and use it in GitHub Desktop.
Java IOS8859-1编码字符串转utf8格式
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String args[]) { | |
String tmp = "\346\212\261\346\255\211\357\274\214\346\240\271\346\215\256\347\233\270\345\205\263\346\263\225\345\276\213\346\263\225\350\247\204\345\222\214\346\224\277\347\255\226\357\274\214\346\234\254\345\220\247\346\232\202\344\270\215\345\274\200\346\224\276\357\274\214\345\216\273\347\234\213\347\234\213\345\205\266\344\273\226\350\264\264\345\220\247"; | |
try { | |
System.out.println(new String(tmp.getBytes("ISO8859-1"),"utf-8")); | |
}catch(Exception e) { | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment