Amir Habib wrote:
> After you set everything to work in utf-8
>
> add these lines in your connection script before
> you run the query
>
> mysql_query("SET character_set_client=utf8");
> mysql_query("SET
> character_set_connection=utf8");
> mysql_query("SET
> character_set_database=utf8");
> mysql_query("SET
> character_set_results=utf8");
> mysql_query("SET character_set_server=utf8");
>
> Good Luck :)
I have a similar problem with my-sql (vers 5.0.18-nt community edition)/Windows XP and used a similar script from an sql editor:
SET character_set_client=utf8;
alter database my_own_db character set utf8;
SET character_set_results=utf8;
SET character_set_server=utf8;
select 'ל';
select ascii('ל');
On my Windows configuration, I have control panel/Regional & Languages/Advanced set to let non-unicode programs recognise unicode as Hebrew.
Am I doing something wrong? What else do I need to do?
The second from last statement is selecting a Hebrew letter lamed. This returns a question mark "?" (ascii 63) when doing this from DB Visual Architect SQL. When doing this from MySQL Command Line Client, I am rendered an "i" with a circumflex (ascii 140) which I remember as the non-unicode Hebrew equivalent.
Trying to insert Hebrew to a test table
mysql> drop table test;
Query OK, 0 rows affected (0.03 sec)
mysql> create table test (hello3 varchar(20));
Query OK, 0 rows affected (0.11 sec)
mysql> insert into test values ('שלום');
DB Visual Architect SQL: inserts four question marks.
MySQL Command Line Client gives this message:
ERROR 1406 (22001): Data too long for column 'hello3' at row 1
Thank you for your help.
David Ziants
dziants@013.net