encode static method
Implementation
static List<int> encode(String text, {String? charset}) {
var encoding = (charset ?? PsdkConst.defCharset).toLowerCase();
if (encoding.startsWith("gb")) {
return PsdkConst.gbkCodec.encode(text);
}
return utf8.encode(text);
}