Imri Persiado Imri Persiado - 1 year ago 104
MySQL Question

How to insert an hebrew value into a mysql db in php

I'm trying to insert an hebrew value into my mysql db, instead of hebrew the values looks like that.


The collation of the table is latin1_swedish_ci by default, I tried also to change to utf-8_general_ci, hebrew_bin, hebrew_general_ci but the result is still the same.

In my code I'm using of course the meta tag to configure the charset:

<meta charset="UTF-8">

And before my php query I added this line:

mysql_query("SET NAMES utf8");

I'm viewing the result in the phpmyadmin.

Answer Source

Check the collation_connection:

show variables like '%collation%'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download