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 d72404556b
commit 107cf5ff75

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);
});