Incomplete multibyte character when using postgres

Has anybody ran into this error with rails and postgres? I get this
quite a bit and I have no idea why.

I resolved this doing:
self.myfield.squish
in my case i was inserting, then before save i did:
self.myfield = self.myfield.squish

Has anybody ran into this error with rails and postgres? I get this
quite a bit and I have no idea why.

Usually a botched UTF8 issue. Make sure that the database, rails, the
website, everything agrees on the character set.

Whenever this happens to me, it’s usually from parsing Excel files that
have been converted to CSV that I’m trying to import and they are simply
botched up… and I either end up hand fixing them or running them
through Iconv to squash the bad characters, but that means losing some
things occasionally.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs