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
Closed

Ruby does not handle UTF-8 from Automator #2

ncanceill opened this issue Feb 5, 2014 · 2 comments

Comments

@ncanceill
Copy link
Contributor

@ncanceill 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
Copy link
Contributor Author

@ncanceill ncanceill commented Feb 5, 2014

I proposed a PR: see #3.

@lukabratos
Copy link
Owner

@lukabratos 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
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants