rails/rails — pull request #13041 by pwnall (2013-11-25 21:12:11+00:00)
Title: Handle errors in SQL queries with UTF8-incompatible encodings.

This should fix #5738, per the discussion in #13023.