title: Issues seen during utf-7 conversion
body: <p>Python : 2.7</p>
  
  <p>I need to convert to utf-7 before I go ahead, so I have used below code in python 2.7 interpreter:</p>
  
  <pre><code>&gt;&gt;&gt; mbox = u'한국의'
  &gt;&gt;&gt; mbox.encode('utf-7').replace(b"+", b"&amp;").replace(b"/", b",")
  '&amp;1VytbcdY-'
  </code></pre>
  
  <p>Same code when I use in my python script as shown below, the output for mbox is <code>b'&amp;Ti1W,XaE'</code> instead of <code>b'&amp;Ti1W,XaE-'</code> i.e. "-" at end of string is missing when running as a script instead of interpreter.</p>
  
  <pre><code>    mbox = "b'" +  mbox + "'"
      print mbox
      mbox = mbox.encode('utf-7').replace(b"+", b"&amp;").replace(b"/", b",")
      print mbox    
  </code></pre>
  
  <p>Please suggest.</p>