Reputation: 175
I'm connecting to MySQL with PHP, fetching Hebrew results, and getting question marks instead of Herbew letters.
I know it may be duplicated, but I did whatever needed from anywhere in the internet (including here) but I got nothing.
I did add the relevant Headers on top of the PHP code:
HEADERS (header('Content-Type: text/html; charset=utf-8'); )
I did add the Meta tags under the "Head" tag:
I did add the relevant SET-NAMES call before connecting:
mysqli_query("SET NAMES utf8");
If it helps, when querying the database using Workbench /J, I do get Hebrew results. However, on PHP...still...getting question marks.
Any idea what can I do?
Thanks!
Upvotes: 2
Views: 1281
Reputation: 175
Ho...just found a question in anoher post about general Encoding: PHP MySQL utf 8 encoding.
Just need to add: $connect->set_charset("utf8");
I'm not deleting this question since it may help some guys in the future.
Thanks!
Upvotes: 5