Open hjyssg opened 4 years ago
//Specify the character encoding used to decode the stdout and stderr output. If set to null, then stdout and stderr will be a Buffer instead of a string.
let {stdout, stderr} = await limit(() => execa(sevenZip, ['l', '-r', '-ba' ,'-slt', filePath], {encoding: null}) );
//stdout is buffer
stdout.toString("utf8")
这个不work 出来的buffer把日语假名全部变成___了
if(files.length === 0){
res.sendStatus(404);
console.error(`[/api/extract] ${filePath} has no content`);
return
}
看看可不可以decoding