Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby does not handle UTF-8 from Automator #2

Closed
ncanceill opened this Issue Feb 5, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@ncanceill
Copy link
Contributor

ncanceill commented Feb 5, 2014

How to reproduce

Use the Snippet service on an UTF-8 string like ƒ, and the following error is thrown:

The action “Execute a Shell script” encountered an error.

The catch

The behavior is related to Automator, because directly using the Ruby script works — eg ruby snippet.rb ƒ. Maybe this is related to #1.

The fix

Using Python instead of Ruby fixes it. Will submit PR in a few moments. Points:

  • By default, Mac OS X is distributed with Python 2 linked to /usr/bin/python.
  • Automator can execute Python scripts as easily as Ruby.
@ncanceill

This comment has been minimized.

Copy link
Contributor Author

ncanceill commented Feb 5, 2014

I proposed a PR: see #3.

@lukabratos

This comment has been minimized.

Copy link
Owner

lukabratos commented Feb 5, 2014

I was able to reproduce this error. Your points are valid and I agree with you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.