diff --git a/lib/execjs/external_runtime.rb b/lib/execjs/external_runtime.rb index ba20613..2c5a452 100644 --- a/lib/execjs/external_runtime.rb +++ b/lib/execjs/external_runtime.rb @@ -159,6 +159,7 @@ module ExecJS def sh(command) output, options = nil, {} options[:external_encoding] = @encoding if @encoding + options[:internal_encoding] = Encoding.default_internal || 'UTF-8' IO.popen(command, options) { |f| output = f.read } output end