Permalink
Browse files

Ensure external runtime return value is utf8

  • Loading branch information...
1 parent db11fdd commit 164b541013a0880850ce4b8fe4c57caefeb4a7ca @josh josh committed Sep 9, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/execjs/external_runtime.rb
@@ -159,6 +159,7 @@ def which(command)
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

1 comment on commit 164b541

@josh
Contributor
josh commented on 164b541 Sep 9, 2011

@wagenet Can you double check that this and your previous fixes are what you need. Then I'll release a new execjs gem.

Please sign in to comment.