title: Difference in Base64 encoding
body: <p>I am trying to encode, Image to Base 64 string in AngularJS2</p>
  
  <pre><code>   handleFileSelect(evt) {
          var files = evt.target.files;
          var file = files[0];
          if (files &amp;&amp; file) {
              var reader = new FileReader();
              reader.onload = this._handleReaderLoaded.bind(this);
              reader.readAsBinaryString(file);
         }
      }
  _handleReaderLoaded(readerEvt) {
         var binaryString = readerEvt.target.result;
         this.model.UserProfileImageBase64 = btoa(binaryString);
        console.log(this.model.UserProfileImage);     
        }
  </code></pre>
  
  <p>I am receiving a different string,in compare to encoding it from Java</p>
  
  <pre><code>Base64.encodeToString(getBytesFromBitmap(bitmap),Base64.NO_WRAP);
  </code></pre>
  
  <p>Any Idea how can we match both Base64 encoding? I had tried same with base64 encoding in angular as well</p>
  
  <pre><code>    this.model.UserProfileImageBase64 = Base64.encode(binaryString);
  </code></pre>
  
  <p>But no dfiference in result.</p>
  
  <p>BtoA and Base64 producing same result and, if I am verifying it online I am getting image as well but I need it in the same format which is generated by Java</p>