I am writing a String class extension method to clear non-ASCII characters. The strings I clean are UTF-8.
When using non-ASCII characters in a file, the console does not start because it interprets curly quotes as regular quotes.
How to avoid curly quote in gsub?
How to write gsub that uses unicode for curly quotes (e.g. U + 201C).
Work in Rails 3.07 and Ruby 1.9.2.
source share