MySQL Forums
Forum List  »  Install & Repo

with mysql 4.1.4 gamma problem with unicode utf8
Posted by: javier gonzalez
Date: September 06, 2004 06:30AM

hi , I have installed mysql 4.1.4 because I wanted to try the unicode support utf8 , now I Explain what I dont understand,

so I declare a database that has the character set utf 8, and inside that database I create a table that has also the character set utf8, ok, now I create a simple script to enter something in a form that is stored in that table, the html page is in utf-8 also, I type something with a unicode editor in arabic and I enter it, and to my surprise when I go to look at the database I find something similar to this : & # 1 5 7 6 ; & # 1 6 1 0 ; & # 1 5 8 7 ; & # 1 5 7 6 ; & # 1 5 8 7 ; & # 1 6 1 0 ; & # 1 5 7 6 ; & # 1 5 7 8 ; & # 1 5 8 9 ; & # 1 5 7 9 ; & # 1 6 0 2 ; & # 1 5 7 8 ; & # 1 6 0 6 ; & # 1 5 8 9 ; & # etc etc

which is what typically I would get if I didnt have unicode support in mysql, so what am I doing wrong?

same thing happens if I just try to enter directly into the database using a client, without using php, say that I load DBManager professional, and I go to that table I created which has the character set UTF-8, so directly I try to enter something in unicode taken from my unicode editor which is SC Unipad , and again it enters it and then instead of viewing the characters in arabic or thai or whatever I entered again I see the lines of 1 5 7 9 ; & # 1 5 7 6 ; & # 1 6 1 0 ; & # 1 5 8 7 ; & # 1 5 7 6 ; & etc etc

so what am I doing wrong, I thought the point of declaring a table and database as character set utf 8 is that I would use my mysql client to view the database and I would see the fields in the original characters of the different languages, so obviously Im doing something wrong,

so basically Im using mysql 4.1.4 gamma, to try the unicode utf8 support, so I set database and table to the character set utf8, and myisam type, then I have tried to enter data both directly into the database from a mysql client and also through php, for this I use my unicode editor SC unipad to get text in unicode in any language, arabic, thai, whatever, and I copy and paste it into the mysql client to insert it into the table, or into a form to insert it into the database through php, and it always happens the same, that when I then go to look at the database, yes the insert went perfect, but is has inserted it just as it was doing it with mysql 4.0 , that is with all the ugly codes ;& # 1 5 7 9 ; & # 1 6 0 2 ; & # 1 5 7 8 ; & # 1 6 0 6 ; & # 1 5 8 9 ; & # 1 5 7 9 ; & # 1 6 0 2 ; & # 1 5 8 9 ;
and instead I thought I would be able to see directly in the database the original characters in arabic, thai etc, thats the reason why I wanted to use it, because I guess that that way they would have occupied max 3 bytes per character, whereas this way they take like 7 bytes per character I guess to write - ;ن - for each of them, crazy



I will appreciate very much any help
thank u
my email is jglifedesign@yahoo.it

best

Javi

Options: ReplyQuote


Subject
Written By
Posted
with mysql 4.1.4 gamma problem with unicode utf8
September 06, 2004 06:30AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.