At first, I thought the problem was that I was returning echo json_encode ($ row) from the ajax call, the result of which was with a change to NULL. But after testing, I found out that the problem exists before that.
In an example php file with:
$test = "Nuñez" echo $test
the result is Nu ez
I searched, but none of the proposed solutions work. How:
mb_internal_encoding('UTF-8'); mb_http_output('UTF-8'); mb_http_input('UTF-8'); mb_language('uni'); mb_regex_encoding('UTF-8'); ob_start('mb_output_handler');
or <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> , or header('content-type: text/html; charset: utf-8'); . And a few more solutions that I already forgot, believe me, I tried a lot.
This is just the beginning of this, I hope this is not a problem with mysql, since my database is in utf-8, so this is my $ mysqli charset. But I think I can not say the same for ajax json_encode. But never mind, one problem at a time. Can someone please help me. Many thanks!
THE PROBLEM IS SOLVED I just needed to install "Encode to UTF-8" in Notepad ++, as before to "Encode to ANSI".
source share