0

I have a string that was encrypted in our MongoDB. It is saved with some encoded characters like ö using Mongoid::EncryptedStringRandomSalt.

When the page loads the data I get an error. I cannot delete the data as it is a customers data.

 ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8): 
<td><%= simple_format(row.notes,{}, :sanitize => false).html_safe? %></td> 

I need to decrypt the data copy out the good characters and replace the encrypted data with the good characters.

jdog
  • 10,351
  • 29
  • 90
  • 165
  • https://stackoverflow.com/questions/17022394/how-to-convert-a-string-to-utf8-in-ruby ? – Leo Jul 20 '18 at 06:37
  • Google has no mentions of `EncryptedStringRandomSalt` whatsoever (apart from this very question). Care for any additional details? – Holger Just Jul 20 '18 at 12:01

0 Answers0