Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Multilocalization of ActionMailer and TMail.

#3003

ActionMailer and TMail need multilocalization in Ruby 1.9 so that a Rails application send a mail with a correct encoding.

Status

Japanese texts

ActionMailer always sends an email in UTF-8. According to RFC 1468, however, Japanese email should be encoded in ISO-2022-JP. The RFC is just a guide, not a standard. But most of MUA prefer ISO-2022-JP to UTF-8 for Japanese. Japanese mobile phones can send/receive internet emails but most of them accept only ISO-2022-JP.

So TMail can treat Japanese texts specially.

But ActionMailer does not use this capability. So Japanese developers use some monkey patches.
This is an implementation in Ruby-GetText-Package.

Other locales

Now we can support other locales with Ruby 1.9.

TMail and Ruby-GetText-Package treats Japanese text specially. I think this is because

  • Ancient versions of Ruby did not have Iconv,
  • Iconv is too platform-depended,
  • NKF and Kconv only supports Japanese,
  • Both of the original developers of the libraries are Japanese.

According to RFC 1557, Korean emails should be encoded in ISO-2022-KR.

I don't know enough about custom in other locales like Chinese/Vietnamese/Arabic. But Maybe this kind of problem can occur in these locales.

TODO

  • ActionMailer should have capability to send an email in other encodings.
    • with String#encode in Ruby 1.9.
  • Default mapping from language to preferred encoding so that a programmer assign a suitable encoding to an email by locale name.
    • Suitable encoding is not unique for a language. Japanese mobile phones which Softbank provides prefer UTF-8.
  • TMail might need some fixes.
  • Advices by Chinese/Vietnamese/Arabic/.... developers are necessary.

Reported by Yugui (Yuki Sonoda) · August 7th, 2009 @ 08:34 AM

State: stale
Milestone: none
Assigned to: Yehuda Katz (wycats) Yehuda Katz (wycats)
Importance: none

Activity

  1. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to stale
    • Importance changed from to

    Marking ticket as stale. If this is still an issue please leave a comment with suggested changes, creating a patch with tests, rebasing an existing patch or just confirming the issue on a latest release or master/branches.

    October 6th, 2010 @ 06:50 AM