Error 'incompatible character encodings: ASCII-8BIT and UTF-8' due to 8-bit encoding of cookies (Rails 3 and Ruby 1.9)?

I just ran into something similar ... and found the fix hidden in the comments to this question, but think it is worth highlighting explicitly.

I just ran into something similar ... and found the fix hidden in the comments to this question, but think it is worth highlighting explicitly: cookies are ASCII-8BIT but rails 3 templates are utf-8 by default. This means using a raw cookie value in a view may raise Encoding::CompatibilityError (if the user has an incompatible in the cookie value) The fix (as noted by Adolfo Builes) is to coerce your cookie values to UTF-8, as in: cookies"location". Force_encoding('UTF-8').

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions