Buffer的创建问题
// 1. var buffer1 = new Buffer('Hello World') console.log('buffer1: ' + buffer1) // 2. var buffer2 = new Buffer('Hello World', 'base64') console.log('buffer2: ' + buffer2) // 3. var buffer3 = new Buffer(10) console.log('buffer3: ' + buffer3.length) // 4. var buffer4 = new Buffer('12345678') console.log('buffer4: ' + buffer4) var buffer5 = new Buffer(7) buffer5.write('12345678') console.log('buffer5: ' + buffer5) 输出结果 buffer1: Hello World buffer2: ej+ buffer3: 10 buffer4: 12345678 buffer5: 1234567
为什么会乱码
为什么输出的不是形如<Buffer 31 32>这种
求解答