# ActionMailer Stripping/Corrupting Special Characters (String Encoding Problem?)

**URL:** <https://www.ruby-forum.com/t/actionmailer-stripping-corrupting-special-characters-string-encoding-problem/143237>\
**Category:** Rails\
**Created:** [July 16, 2008, 5:24pm UTC](https://www.ruby-forum.com/t/actionmailer-stripping-corrupting-special-characters-string-encoding-problem/143237 "2008-07-16T17:24:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahadewa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9e8a1a/32.png) [@mahadewa](https://www.ruby-forum.com/u/mahadewa)\
**Post date:** [July 16, 2008, 5:24pm UTC](https://www.ruby-forum.com/t/actionmailer-stripping-corrupting-special-characters-string-encoding-problem/143237/1 "2008-07-16T17:24:53Z")

</div>

I’m hoping that I’m just missing something simple — but I’m banging  
my head against a wall on this one…

I have a simple mailer model that sends a single-part, text/plain  
message (generated using an ERB template). In that email I am trying  
to include special characters (the copyright character © in this case  
– but anything would make me happy right now).

But no matter how I insert the character into the document, the email  
is delivered with this character missing or as an unknown character  
(mail client shows a “?” or special “mystery character”).

I have confirmed that my email header is set to UTF-8 encoding.

So far I’ve tried:  
\<%= 169.chr %\>  
\<%= “/xA9” %\>  
©

What gives?

BTW, I’m testing using rSpec and the create\_my\_mailer\_method method  
which uses TMail - and the specs pass just fine. It’s just actual  
delivery that’s different here.

-Chris

---

<div class="post-metadata">

**Author:** ![mahadewa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9e8a1a/32.png) [@mahadewa](https://www.ruby-forum.com/u/mahadewa)\
**Post date:** [September 3, 2008, 9:43pm UTC](https://www.ruby-forum.com/t/actionmailer-stripping-corrupting-special-characters-string-encoding-problem/143237/2 "2008-09-03T21:43:39Z")

</div>

I have the same problem and reported it here:

[http://jira.codehaus.org/browse/JRUBY-2686](http://jira.codehaus.org/browse/JRUBY-2686)

On Jul 16, 11:23 am, Chris P.
