added ability to change code page back to cp866 in win32

This commit is contained in:
coderaiser 2012-09-23 05:01:04 -04:00
parent 7c5f83c409
commit 22e5cb8e01

View file

@ -20,8 +20,9 @@ exports.listen = function(pServer){
socket.on('message', function(pCommand) {
console.log(pCommand);
if(process.platform === 'win32')
pCommand = 'chcp 65001 |' + pCommand;
/* change code page to unicode and then back to cp866 */
if(process.platform === 'win32')
pCommand = 'chcp 65001 |' + pCommand + '&& chcp 866';
exec(pCommand, getExec);
});