Closed alenhu closed 1 year ago
I change headers.js 。 var iconvl = require('iconv-lite'); var UTF8 = require('utf-8'); var decodeStr = function (val, offset, length, encoding) { var tmp = val.slice(offset, indexOf(val, 0, offset, offset + length)); if(UTF8.isNotUTF8(tmp)){ return iconvl.decode(tmp,'GBK').toString(); }else{ return tmp.toString(); } }
if still revelant send a test case
I change headers.js 。 var iconvl = require('iconv-lite'); var UTF8 = require('utf-8'); var decodeStr = function (val, offset, length, encoding) { var tmp = val.slice(offset, indexOf(val, 0, offset, offset + length)); if(UTF8.isNotUTF8(tmp)){ return iconvl.decode(tmp,'GBK').toString(); }else{ return tmp.toString(); } }