Greasy Fork is available in English.

encodeToGb2312

转码 GB2312

Dette script bør ikke installeres direkte. Det er et bibliotek, som andre scripts kan inkludere med metadirektivet // @require https://update.greasyfork.org/scripts/368137/601683/encodeToGb2312.js

Skaber
Rhilip
Version
0.0.1.20180602124305
Oprettet
17.05.2018
Opdateret
02.06.2018
Licens
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