当我使用这个http://string-functions.com/encodedecode.aspx并encode
使用 :Windows-1252
和decode
with: 进行设置时utf-8
。
我把这个字符串:
Књижевна заједница Ðовог Сада
我得到正常的结果: Књижевна заједница Новог Сада
。
但是当我用这种方法在java中尝试时:
public static String convertString(String s) throws UnsupportedEncodingException {
String t = new String (s.getBytes("Windows-1252"), "UTF-8");
}
我得到这个结果: Књижевна заједница �?овог Сада
。
任何想法 ?