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