<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>zmy (奥尔特星云)</title>
    <link>https://ruby-china.org/zmy</link>
    <description>日月星辰</description>
    <language>en-us</language>
    <item>
      <title>Action Mailer attachment 附件中文名乱码</title>
      <description>&lt;p&gt;发邮件时添加的附件
filename = Iconv.conv('GB2312//IGNORE', 'UTF-8//IGNORE',  "附件名.pdf")
attachment {:content_type =&amp;gt; "application/pdf", :body =&amp;gt; PDFKit.new(email_pdf_file).to_pdf, :filename =&amp;gt; filename}&lt;/p&gt;

&lt;p&gt;foxmail 附件名正常（不转换则乱码），outlook 客户端显示的附件名是‘未命名.pdf'，网页版 qq 邮箱正常，163 邮箱转码不转码均乱码
GB2312，GBK，UTF-8，这几种都试过，有什么通用的方法解决大多数邮箱平台的附件名乱码&lt;/p&gt;</description>
      <author>zmy</author>
      <pubDate>Thu, 30 Jun 2016 09:18:59 +0800</pubDate>
      <link>https://ruby-china.org/topics/30407</link>
      <guid>https://ruby-china.org/topics/30407</guid>
    </item>
  </channel>
</rss>
