I'm using glassfish with a webservice to access/write the mysql database.The problem is in mysql: when inserting english chars everything looks ok, but when inserting, say hebrew chars the rows are displayed reversed. Explainig the reversed thing: let's assume that table myTable has the following structure
+----------+------------------+------+-----+---------+----------------+
| Field | Type | ..
+----------+------------------+------+-----+---------+----------------+
| id | int(10) unsigned | ...
| artist | varchar(64) | ...
| title | varchar(64) | ...
| genre | varchar(128) | ...
| filename | varchar(512) | ...
| uploaded | tinyint(1) | ...
+----------+------------------+------+-----+---------+----------------+
and this is how it look like for english and hebrew chars:
I've set the charset and collate(although after creating and inserting data into DB):
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
+----------------------+-----------------+
And edited even the my.cnf:
[mysqld]
skip-character-set-client-handshake
character-set-server = utf8
init-connect='SET NAMES utf8'
collation-server=utf8_general_ci
Any help appreciated.