1.0.3 • Published 6 years ago

urlencode-gb2312-ignore v1.0.3

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

urlencode-gb2312-ignore

Build Status Coverage Status

某些第三方 api 只支援 gb2312 参数, 但碍于又不想装 iconv (alpine 需要装 python), 所以采用 urlencode (iconv-lite based) charset = 'gb2312' 时触发 ignore

Install

$ npm install urlencode-gb2312-ignore

Usage

var urlencode = require('urlencode-gb2312-ignore');

console.log(urlencode('测', 'gb2312')); // '%B2%E2'
console.log(urlencode('測', 'gb2312')); // '', 因为 '測' 不在 gb2312 list

// 其余用法请参考 https://github.com/node-modules/urlencode

License

MIT

GB2312 of unicode list