Skip to content

Instantly share code, notes, and snippets.

@JacksonTian
Last active August 29, 2015 14:22
Show Gist options
  • Save JacksonTian/acddff684ff27d1dac92 to your computer and use it in GitHub Desktop.
Save JacksonTian/acddff684ff27d1dac92 to your computer and use it in GitHub Desktop.
MaxBuffer
var exec = require('child_process').exec;
var unicode = '中文测试'; // length: 12
var child = exec('echo ' + unicode, {
encoding: 'utf8',
maxBuffer: 8
}, function(err, stdout, stderr) {
console.log(err);
console.log(stdout);
console.log(stderr);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment