This project is archived and is in readonly mode.

#3003 ✓stale
Yugui (Yuki Sonoda)

Multilocalization of ActionMailer and TMail.

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

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.

Comments and changes to this ticket

  • Rohit Arondekar

    Rohit Arondekar October 6th, 2010 @ 06:50 AM

    • 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.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages