Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Linux, Apache, MySQL > MySQL Help

MySQL Help Post any question relating to MySQL here and hopefully someone can help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2004-09-05, 12:12 PM
Junior Member
 
Join Date: Sep 2004
Posts: 1
javismiles
Default

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 : بيسبسيبتصثقتنصثقصثبيسبسيبتصث&#16

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 1579;بيسبسيبتصث&#16 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 ;ثقتنصثقصث&#1576 etc etc
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

so what am I doing wrong, I must be doing something wrong, as Ive read everywhere that this mysql 4.1.4 can support utf-8 perfectly,

at the beginning I thought my mistake may be in the php code , but then when I tried to enter unicode directly into the database without using php , and I got the same result, I realized its nothing to do with php, its something Im doing wrong I guess with the database itself



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

best

Javi
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:04 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.