The problem is that I have latin1 charset in db. The default output is utf-8 in php. even when i am using php iconv, it returns null as the new string is supposedly already utf-8.
Converting DB would need downtime.
I cant use json_encode because the string is malformed utf-8 containing �.
I need an alternative to temporarily fix the issue without having to migrate the db.
I need to transfer the associative array back to JS. I am using Ajax for getting the data.