Rails another encoding hell in emails -


i have struggled utf8 encoding issues on past, time it's html email template being processed.

for reason ignore, rails tries parse .html.erb email file ascii 8-bit, , therefore cannot add variables contain utf8 chars

actionview::template::error (incompatible character encodings: ascii-8bit , utf-8):     1: <h1>bonjour <%= @first_name %>,</h1> 

(when first name michaël ë)

i have used several tricks, adding

config/environment.rb

encoding.default_external = encoding::utf_8 encoding.default_internal = encoding::utf_8 

config/application.rb

config.encoding = "utf-8" 

using stupid debian 6 linux production server / ruby 2.0.0p353. works fine on local dev installation windows, joke...

what can force loading html email view utf-8 ?


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -