IM在紅寶石1.9.3p545和Ruby的編碼問題的Rails 3.0.20顯示在郵件怪異字符
我有一個接觸的形式,我發送以下電子郵件給用戶,當他們填寫起來:
Thank you for your inquiry Beverly, This email is a receipt to confirm we have received your inquiry and `we'll` be in touch shortly.
我的問題是它顯示we'll
而不是顯示we'll
,我需要做什麼來正確顯示消息?
我控制器創建行動:
def create
@inquiry = Inquiry.new(params[:inquiry])
if @inquiry.save
if @inquiry.ham?
begin
InquiryMailer.notification(@inquiry, request).deliver
rescue
logger.warn "There was an error delivering an inquiry notification.\n#{$!}\n"
end
begin
InquiryMailer.confirmation(@inquiry, request).deliver
rescue
logger.warn "There was an error delivering an inquiry confirmation:\n#{$!}\n"
end
end
redirect_to thank_you_inquiries_url
else
render :action => 'new'
end
end
我使用它煉油廠CMS
上app/views/inquiry_mailer/confirmation.html.erb
我:<%= InquirySetting.confirmation_message(Globalize.locale).gsub("%name%", @inquiry.name) %>
和煉油廠設置有以下電郵:
Thank you for your inquiry %name%,
This email is a receipt to confirm we have received your inquiry and we'll be in touch shortly.
任何幫助將不勝感激!
您可以發佈您的電子郵件模板嗎? – 2014-10-20 16:59:49
更新了我的問題,你可以看看嗎? – neo 2014-10-20 17:27:17