![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi everyone I am sending mails with rails in German. The Problem is that the German letters ä,ü,ö are arriving correctly at the receiver. When the subject contains the word Für the receiver gets Für Does anybody knows this issue? |
#3
| |||
| |||
|
|
Adam Meyer wrote: Hi everyone I am sending mails with rails in German. The Problem is that the German letters ä,ü,ö are arriving correctly at the receiver. When the subject contains the word Für the receiver gets Für Does anybody knows this issue? This is strange. ActionMailer (or is it TMail?) should encode this correctly like =?utf-8?Q?=C3=84=C3=96=C3=9C?= (this is ÄÖÜ). For me it does it very well. What version do you use and what is your code? Regards, T. |
#4
| |||
| |||
|
|
... I am riding on 2.2.2 with Actionmailer and my code is |
#5
| |||
| |||
|
|
Adam Meyer wrote: ... I am riding on 2.2.2 with Actionmailer and my code is I have 2.3.4; maybe it's a new feature that the headers are quoted automatically. For now you could do it by hand. Somewhere in the TMail module must be the function to make RFC 2231 headers. I can't find it now. So a temporary solution was: @subject = "=?utf-8?Q?#{[@subject].pack("M").chomp}?=" A more advanced function would break longer strings into multiple lines. Hope this helps, T. |
#6
| |||
| |||
|
|
T. N.t. wrote: Adam Meyer wrote: ... I am riding on 2.2.2 with Actionmailer and my code is I have 2.3.4; maybe it's a new feature that the headers are quoted automatically. For now you could do it by hand. Somewhere in the TMail module must be the function to make RFC 2231 headers. I can't find it now. So a temporary solution was: Â* Â* Â*@subject = "=?utf-8?Q?#{[@subject].pack("M").chomp}?=" A more advanced function would break longer strings into multiple lines. Hope this helps, T. hmm... but its not only in the subject. its in body too. I am scared to update my rails, I dont want my app to break down completely. |
#7
| |||
| |||
|
|
hmm... but its not only in the subject. its in body too. |
#8
| |||
| |||
|
|
Adam Meyer wrote: hmm... but its not only in the subject. its in body too. I don't know what @body[:url] is, but for part :content_type => "text/plain", :body => render_message("invoice.html.erb", body) you probably should say :content_type => 'text/plain; charset=utf-8' T. |
#9
| |||
| |||
|
|
T. N.t. wrote: Adam Meyer wrote: hmm... but its not only in the subject. its in body too. I don't know what @body[:url] is, but for part :content_type => "text/plain", :body => render_message("invoice.html.erb", body) you probably should say :content_type => 'text/plain; charset=utf-8' T. @body[:url] is just a value I want to use in the email template. Your solution might work in the body, but what is with the subject? |
#10
| |||
| |||
|
|
I am scared to update my rails, I dont want my app to break down completely. |
![]() |
| Thread Tools | |
| Display Modes | |
| |