Permalink
Browse files

Merge pull request #31 from zsand/master

fix problem with files contains utf-8 symbols
  • Loading branch information...
CraigWilliams committed Feb 16, 2013
2 parents f7440f1 + 73f772b commit 73f36c89ce46a989f4e82fad43665b4303e33e00
Showing with 1 addition and 1 deletion.
  1. +1 −1 beautify_ruby.py
View
@@ -34,7 +34,7 @@ def beautify_buffer(self):
working_dir = os.path.dirname(self.filename)
body = self.active_view.substr(self.buffer_region)
beautifier = subprocess.Popen(self.cmd(), shell=True, cwd=working_dir, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
- out = beautifier.communicate(body)[0].decode('utf8')
+ out = beautifier.communicate(body.encode("utf-8"))[0].decode('utf8')
if (out == "" and body != ""):
sublime.error_message("check your ruby interpreter settings")
return body

0 comments on commit 73f36c8

Please sign in to comment.