title: Soap - base64binary data in PHP
body: <p>I have a SOAP client in PHP that makes calls to a WSDL service. One of the functions returns a <strong>base64binary</strong> data. I've been trying to decode it without any luck.</p>
  
  <p>base64_decode($encoded_base64data) will not work. I tried using base_convert() and mv_convert_encoding() with various parameters, but could not get a proper result.</p>
  
  <p>The encoded result data starts with:</p>
  
  <pre><code>��`I�%&amp;/m�{J�J��t��`$ؐ@�������iG#)�*��eVe]f@�흼��{����{����;�N'���?\fdl��J�ɞ!���?~|?"
  </code></pre>
  
  <p>(the data is much longer, this is just a small portion of the string)</p>
  
  <p>Any idea how it could be done?</p>
  
  <p>Thanks</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I've extended the SoapClient with a new __doRequest() method to check that the received data is a proper base64 string. I got a proper base64 encoded string, and the result shown above is the decoded response.</p>
  
  <p>Anyhow, the string was decoded automatically by the SoapClient from base64 to binary (as @hakre suggested), so I only have to deal with the binary response.</p>
  
  <p>Now what I need is to decode the binary string into something that would look like a readable format. The final response should contain Georgian output, so I'm trying to figure out the original encoding (but that's a different question).</p>