Encode a utf8 string to a buffer that encoding with GBK, GB18030, GB2132, ISO8859_1 .etc
the utf8 string
the encoding method: GBK, GB18030, GB2132, ISO8859_1
import * as iconv from 'iconv';let result = iconv.encode('hello 中国', 'GBK'); Copy
import * as iconv from 'iconv';let result = iconv.encode('hello 中国', 'GBK');
Encode a utf8 string to a buffer that encoding with GBK, GB18030, GB2132, ISO8859_1 .etc