although the Buffer 'binary' is deprecated, I have to use it: I am writing a web application using node js + express. the user can upload the file, and the file name will be Garbled if not use
res.download(allpath,buf0.toString('binary'));
look up the value (this is a Chinese char):
console.log(new Buffer('η'));
: Buffer, e7.89.9b
and
var buf0=new Buffer('η'); console.log(new Buffer(buf0.toString('binary')));
: Buffer, c3, a7, c2.89, c2.9b
what does this algorithm mean, and why use a binary toString?
source share