PGError: ERROR: invalid byte sequence for encoding "UTF8": 0xa7 (ActiveRecord::StatementInvalid)
HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".
The above error was being generated when I was trying to save model objects that had their string and text attributes assigned from data that had been scrapped using http with scRUBYt. After searching on Google the only 'work-around' I found was to use base64 encode and decode when reading and writing to these model attributes / database columns
Given the following migration
Our model before and then after applying the work-around