Php base base64 encode and decode not working correctly
<p>I want to encode and decode in php using base64, but the encode and decode function does not give me correct output. I am using code from <a href="http://base64_encode.onlinephpfunctions.com/" rel="nofollow">online php functions</a>. </p>

<p>I encode this string </p>

<blockquote>
  <p>"best arabic songs loves 2013 nonstop أفضل من الأغاني الحب الجديد
  كلمات العربي"</p>
</blockquote>

<p>and get the output:</p>

<blockquote>
  <p>"YmVzdCBhcmFiaWMgc29uZ3MgbG92ZXMgMjAxMyBub25zdG9wINij2YHYttmEINmF2YYg2KfZhNij2LrYp9mG2Yog2KfZhNit2Kgg2KfZhNis2K/ZitivINmD2YTZhdin2Kog2KfZhNi52LHYqNmK"</p>
</blockquote>

<p>When I use this php code it does not give a correct encode and decode string:</p>

<pre><code>    $str = 'best arabic songs loves 2013 nonstop أفضل من الأغاني الحب الجديد كلمات العربي';
    $decodestr = base64_decode($str);

    echo 'decode = '.$decodestr

    $encodestr = base64_encode($decodestr );

    echo '&lt;br&gt;';
    echo 'encode = '.$encodestr;



    i got this output :

decode = më-j¶›‰Ë(ž%¢÷¬ÛMwž‰ì¶Š

encode = bestarabicsongsloves2013nonstoo=
</code></pre>

<p>Can any one help me with how I can get correct encode and decode string using base64 encode and decode function in php? </p>