搜索产品
返回
try { CharsetDecoder dec = Charset.forName("UTF-8").newDecoder(); dec.onMalformedInput(CodingErrorAction.REPORT); dec.onUnmappableCharacter(CodingErrorAction.REPORT); return dec.decode(ByteBuffer.wrap(bytes)).toString(); } catch (Exception e) { try { return new String(bytes, "GBK"); } catch (Exception e2) { try { return new String(bytes, "ISO-8859-1"); } catch (Exception e3) { return ""; } } } } %>