decode static method

String decode(
  1. List<int> binary, {
  2. String? charset,
})

Implementation

static String decode(List<int> binary, {String? charset}) {
  var encoding = (charset ?? PsdkConst.defCharset).toLowerCase();
  if (encoding.startsWith("gb")) {
    return PsdkConst.gbkCodec.decode(binary, allowInvalid: true);
  }
  return utf8.decode(binary, allowMalformed: true);
}