Gal
Gal

Reputation: 1

Issue with hebrew

I am having issues using hebrew with mysql and PHP, i have already tried this:

the db collation has to be utf8_general_ci.

the collation of the table with hebrew has to be utf8_general_ci in my php connection script i put

header('Content-Type: text/html; charset=utf-8');

in my xhtml head tag i put after selecting the db in the connection script i put

mysql_query("SET NAMES 'utf8'");

And it is still not working. In phpmyadmin i can see the hebrew characters but when i display them in php all i see is "?????" If anyone could help me that would be great!

Upvotes: 0

Views: 120

Answers (1)

Dipanwita Kundu
Dipanwita Kundu

Reputation: 1667

In your html page

  1. Under <head> tage, add <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

At the time of mysql insert use utf8_encode & when show data try to use utf8_decode

Upvotes: 1

Related Questions