67,543
社区成员




String str = "\\xB8\\xC9\\xB0\\xD7\\xC6\\xCF\\xCC\\xD1\\xBE\\xC6";
Pattern pattern = Pattern.compile("(?i)\\\\x([0-9a-f]{2})");
Matcher matcher = pattern.matcher(str);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
while (matcher.find()) {
baos.write(Integer.parseInt(matcher.group(1), 16));
}
byte[] bytes = baos.toByteArray();
String decoded = new String(bytes, "GB2312");
System.out.println(decoded);
干白葡萄酒