diff --git a/solcjs b/solcjs index fa643a95..3c014b4b 100755 --- a/solcjs +++ b/solcjs @@ -55,16 +55,10 @@ if (argv['standard-json']) { abort('Compiler does not support Standard JSON I/O'); } - var size = fs.fstatSync(process.stdin.fd).size; - - if (size <= 0) { - abort('Empty input was read'); - } - // This accepts integer as a parameter, where 0 corresponds to stdin_fileno var input = fs.readFileSync(0); - console.log(solc.compileStandard(input.toString())); + console.log(solc.compileStandard(input.toString('utf8'))); process.exit(0); } else if (files.length === 0) { console.error('Must provide a file');