1. 程式人生 > >JAVA GBK 字串轉為utf-8

JAVA GBK 字串轉為utf-8

		String str = "µâº£´¼×¢ÉäÒ";
		byte[] fullByte1 = new String(str.getBytes("ISO-8859-1"), "GBK")
				.getBytes("UTF-8");
		String fullStr = new String(fullByte1, "UTF-8");
		System.out.println("string from GBK to UTF-8 byte:  " + fullStr);