Utf8 converter, convert recursively for deep type such as Object and Array
$ npm install --save utf8-deep-converter
const converter = require('utf8-deep-converter')
converter.utf8DeepEncode({obj:'可以',数组:['也','可以'],normal:'pass'}) //utf8 encode
// {"obj":"�以","normal":"pass","��":["�","�以"]}
converter.utf8DeepDecode({"obj":"�以","normal":"pass","��":["�","�以"]}) //utf8 decode
// {"obj":"可以","normal":"pass","数组":["也","可以"]}
const converter = require('utf8-deep-converter')
encode utf8 type data
arguments | required | description |
---|---|---|
obj | true | recursive encode, auto passing normal type |
decode utf8 type data
arguments | required | description |
---|---|---|
obj | true | recursive encode, auto passing normal type |