在Windows中从Windows-1252转换为utf-8

时间:2015-12-11 10:05:19

标签: java utf-8 character-encoding windows-1252

当我使用此http://string-functions.com/encodedecode.aspx时,我将encodeWindows-1252decode设置为:utf-8

我把这个字符串

Књижевна заједница Ðовог Сада

我得到正常结果: Књижевна заједница Новог Сада

但是当我使用这种方法

在java中尝试时
public static String convertString(String s) throws UnsupportedEncodingException {
    String t = new String (s.getBytes("Windows-1252"), "UTF-8");
}

我得到了这个结果: Књижевна заједница �?овог Сада

有什么想法吗?

0 个答案:

没有答案
相关问题