I'm writing an upload script for contact management, but having encoding issues:
#=> Encoding::UndefinedConversionError: "\xFA" from ASCII-8BIT to UTF-8
I will not always know the encoding supplied, and this is the result of `some_string.encode("UTF-8")`
I have also tried .force_encoding("UTF-8") to no avail. For now I'm simply trying to bypass invalid characters by replacing them with ? or removing them completely so Postgres doesn't blow up on insert.
Any help or advice would be appreciated,
Garrett Lancaster