Skip to content

Instantly share code, notes, and snippets.

@TheAnonymous
Created October 22, 2013 12:13
Show Gist options
  • Save TheAnonymous/7099525 to your computer and use it in GitHub Desktop.
Save TheAnonymous/7099525 to your computer and use it in GitHub Desktop.
Example of how to escape illegal character in ruby UTF-8
result = result.encode("UTF-8", "binary", :invalid => :replace, :undef => :replace, :replace => "")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment