Skip to content

Ruby does not handle UTF-8 from Automator #2

@ncanceill

Description

@ncanceill

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions