Closed brendon closed 10 years ago
That's good to know about. Thanks, @brendon !
I'm not sure if this would help, because we're dealing with invalid URI-encoded strings. So the strings aren't invalid (all of their chars are ASCII), but you can't decode them into UTF-8 before you clean them up.
Thanks @sbleon, that's fair enough :)
Have a great day!
I posted a question on Stack Overflow: http://stackoverflow.com/a/26423207/129798 regarding improper characters causing encoding errors on my Rails app.
Someone replied and suggested I use String#scrub which is native in Ruby 2.1 but has a back port down to 1.9: https://github.com/hsbt/string-scrub
Would using this simplify utf8-cleaner a bit?