title: UTF-8 to readable characters
body: <p>Encoding and decoding a string is not as easy as I thought.</p>
  
  <p>The original string is as follows:</p>
  
  <pre><code>at the end of → al término de • después de
  </code></pre>
  
  <p>After PHP base64 encoding (used three times) it looks different:</p>
  
  <pre><code>VUVkSksxbFlVV2RrUjJoc1NVZFdkVnBEUW5aYWFuZDJXV28wWnpSdllWTkpSMFp6U1VoVVJIRllTblJoVnpWMlNVZFNiRWxQUzBGdmFVSnJXbGhPZDJSalQzQmplVUpyV2xSNGQxQm5QVDA9
  </code></pre>
  
  <p>When trying JS window.atob() to decode the string, the result is this:</p>
  
  <pre><code>at the end of â al tÃ©rmino de â¢ despuÃ©s de
  </code></pre>
  
  <p>UTF-8 characters are not displayed properly. What function should I use to fix this?</p>