update files

This commit is contained in:
nuintun 2016-02-26 16:23:42 +08:00
parent a4a86ee958
commit c1893b1e38

View File

@ -27,7 +27,9 @@ function DecodeGenerator(){
charset = jschardet.detect(data).encoding;
}
return charset ? iconv.decode(data, charset) : data.toString();
return charset && iconv.encodingExists(charset)
? iconv.decode(data, charset)
: data.toString();
} else {
return '';
}