UTF8 problems

Dear Sir/Madam,

I’ve got a MySQL table with UTF8 charset and collation. Here is some sample column description of the table i am trying to render.

mysql> show full columns from contacts;
±-------------±-------------±----------------±-----±----±--------±---------------±--------------------------------±--------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
±-------------±-------------±----------------±-----±----±--------±---------------±--------------------------------±--------+
| contact_id | int(4) | NULL | NO | PRI | NULL | auto_increment | select,insert,update,references | |
| company | varchar(255) | utf8_unicode_ci | NO | | NULL | | select,insert,update,references | |

On PHPMYADMIN it shows the content perfectly according to arabic language, however when i render it through connector i am getting series of question markers such as ???.

I checked the default encoding of my php and mysql is utf8. Ive tried to pass the encoding again with $gridConn->set_encoding(“utf-8”), but it was no help.

I think somewhere between the mysql_fetch_array and rendering to Connector this is happening.

Any comments please?

Regards

The connector itself doesn’t apply any string conversions.
Anyway, check that html page in browser is rendered as utf-8 as well ( Menu - Tools - Encoding in case of Chrome )

Also, you can try to add something like next before connector initialization

mysql_query("SET NAMES utf8");

I placed mysql_query(“SET NAMES utf8”) as suggested and it resolved the issue.

I had tried this before however with mysqli_query which failed me.

Thanks anyways.

Regards