Has anybody ran into this error with rails and postgres? I get this quite a bit and I have no idea why. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Philip Hallstrom
2011-Apr-26 16:03 UTC
Re: 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.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. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Augusto César
2012-Mar-20 15:59 UTC
Re: Incomplete multibyte character when using postgres
I resolved this doing: self.myfield.squish in my case i was inserting, then before save i did: self.myfield = self.myfield.squish On Tuesday, April 26, 2011 1:03:52 PM UTC-3, Philip wrote:> > > 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. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/h41j0rQmICQJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.