<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>5028</bug_id>
          
          <creation_ts>2004-08-20 09:11:08 +0400</creation_ts>
          <short_desc>Add Quoted-Printable encode/decode methods to TMail::Mail class</short_desc>
          <delta_ts>2008-04-12 23:26:29 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>ruby-tmail</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sir Raorn">raorn</reporter>
          <assigned_to name="nbr">nbr</assigned_to>
          <cc>cas</cc>
    
    <cc>imz</cc>
    
    <cc>led</cc>
    
    <cc>majioa</cc>
    
    <cc>mike</cc>
    
    <cc>rider</cc>
    
    <cc>stalker</cc>
    
    <cc>stanv</cc>
    
    <cc>timonbl4</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>18220</commentid>
    <comment_count>0</comment_count>
    <who name="Sir Raorn">raorn</who>
    <bug_when>2004-08-20 09:11:08 +0400</bug_when>
    <thetext>Something like that:

module TMail
    class Mail
	def qp_encode
	    store &apos;Content-Transfer-Encoding&apos;, &apos;Quoted-Printable&apos;
	    self.body = [self.body].pack(&apos;M&apos;)
	    end
	end
	def qp_decode
	    if /quoted-printable/i =~ self.transfer_encoding(&apos;&apos;)
		store &apos;Content-Transfer-Encoding&apos;, &apos;8bit&apos;
		self.body = self.body.unpack(&apos;M&apos;)
	    end
	end
    end
end</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32826</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2005-11-04 10:44:24 +0300</bug_when>
    <thetext>LOL.  Вчера ровно этим (decode only, QP+B64) и занимался:

require &apos;tmail/mail&apos;

module TMail
  class Mail
    def decode
      case transfer_encoding
      when nil then return body
      when &quot;base64&quot; then return body.unpack(&apos;m*&apos;)
      when &quot;quoted-printable&quot; then return body.unpack(&apos;M*&apos;)
      else return body #raise &quot;Unknown encoding: #{transfer_encoding}&quot;
      end
    end 
    #def save(file=nil, decode=true)
    # # filename can be set or taken from the mail itself
    # file = disposition_param(&apos;filename&apos;) unless file
    #end
  end
end</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68194</commentid>
    <comment_count>2</comment_count>
    <who name="Sir Raorn">raorn</who>
    <bug_when>2008-04-12 23:26:16 +0400</bug_when>
    <thetext>Ну в общем новый TMail умеет и QP тоже.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>