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
Post a Comment