encodeToGb2312

转码 GB2312

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/368137/601683/encodeToGb2312.js

Author
Rhilip
Version
0.0.1.20180602124305
Created
2018-05-17
Updated
2018-06-02
License
N/A

This code is from https://github.com/liuxiaodong/encodeToGb2312

You can use like:

var result = encodeToGb2312("字符串转GB2312");
result:  D7D6B7FBB4AED7AA474232333132
var result = encodeToGb2312("字符串转GB2312",true);
result:  %D7%D6%B7%FB%B4%AE%D7%AA%47%42%32%33%31%32