<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>unquote_quoted_printable_and_convert_to (TMail::Unquoter)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> <pre><span class="ruby-comment cmt"># File lib/action_mailer/vendor/tmail-1.2.3/tmail/quoting.rb, line 85</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unquote_quoted_printable_and_convert_to</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">to</span>, <span class="ruby-identifier">from</span>, <span class="ruby-identifier">preserve_underscores</span>=<span class="ruby-keyword kw">false</span>) <span class="ruby-identifier">text</span> = <span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/_/</span>, <span class="ruby-value str">" "</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">preserve_underscores</span> <span class="ruby-identifier">text</span> = <span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\r\n|\r/</span>, <span class="ruby-value str">"\n"</span>) <span class="ruby-comment cmt"># normalize newlines</span> <span class="ruby-identifier">convert_to</span>(<span class="ruby-identifier">text</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">"M*"</span>).<span class="ruby-identifier">first</span>, <span class="ruby-identifier">to</span>, <span class="ruby-identifier">from</span>) <span class="ruby-keyword kw">end</span></pre> </body> </html>