title: JSON encoding/decoding with unicode in rails
body: <p>I <strike>upgraded</strike> downgraded to rails 2.3.17 due to the security bugs, but now I can't decode json strings that I have saved down to a DB if they have unicode in them :(. Is there a way to process the string such that it decodes properly?</p>
  
  <pre><code>e = ActiveSupport::JSON.encode({'a' =&gt; "Hello Unicode \u2019"})
  ActiveSupport::JSON.decode(e)
  </code></pre>
  
  <p>gives me</p>
  
  <pre><code>RangeError: 8217 out of char range
  from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-2.3.17/lib/active_support/json/backends/okjson.rb:314:in `unquote'
  from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-2.3.17/lib/active_support/json/backends/okjson.rb:251:in `strtok'
  from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-2.3.17/lib/active_support/json/backends/okjson.rb:215:in `tok'
  from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-2.3.17/lib/active_support/json/backends/okjson.rb:178:in `lex'
  from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-2.3.17/lib/active_support/json/backends/okjson.rb:46:in `decode'
  from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-2.3.17/lib/active_support/json/backends/okjson.rb:612:in `decode'
  from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-2.3.17/lib/active_support/json/decoding.rb:14:in `decode'
  from (irb):30
  from /usr/local/bin/irb:12:in `&lt;main&gt;'
  </code></pre>
  
  <p>I can't change the first line since it's coming from the DB like that.</p>
  
  <p>This used to work.</p>