Skip to content

Commit

Permalink
Merge pull request #40 from und1f/master
Browse files Browse the repository at this point in the history
Support for encoding different than UTF-8
  • Loading branch information
misfo committed Mar 12, 2013
2 parents 735340a + 0efcbca commit 0526aad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shell_turtlestein.py
Expand Up @@ -49,7 +49,7 @@ def cmd_settings(cmd):
Return the default settings with settings for the command merged in
"""
d = {}
for setting in ['exec_args', 'surround_cmd']:
for setting in ['exec_args', 'surround_cmd', 'encoding']:
d[setting] = settings().get(setting)
try:
settings_for_cmd = (c for c
Expand Down Expand Up @@ -159,6 +159,8 @@ def on_done(self, cwd, cmd_str):
shell_cmd = "%s < %s" % (shell_cmd, pipes.quote(temp.name))
exec_args = settings['exec_args']
exec_args.update({'cmd': shell_cmd, 'shell': True, 'working_dir': cwd})
if settings['encoding']:
exec_args.update({'encoding': settings['encoding']})

self.window.run_command("exec", exec_args)

Expand Down

0 comments on commit 0526aad

Please sign in to comment.