我已经破译使用缓冲区base64编码字符串,现在我已经发现了一些有趣的:Node.js的:不同的缓冲输出
能正常工作,输出解码字符串UTF8
decoded = new Buffer(data.content, 'base64')
console.log('Decoded:' + decoded);
// outputs content of a markdown file
然而,这种输出的十六进制字符:
decoded = new Buffer(data.content, 'base64')
console.log(decoded);
// outputs<Buffer 23 20 33 30 32 34 20 66 ...>
这是为什么还是什么我做错了什么?不应该输出相同吗?