Isoss
June 14th, 2006, 09:25 PM
Hey
I am having a collation problem in mysql. My problem has nothing to to with programming, but since Mysql is used by programmers so I thought you'd help me guys so please bare with me a little bit!
I have a christian arabic website and I've first developed it in windows using IIS and then apache servers. Everything went good with the collations and theser stuff, so I was able to view my retrieved data in correct arabic characters in my webpage with localhost, and was able to view them properly with phpmyadmin.
Now after I moved to linux, everything was ok and could continue developing my website and arabic characters are shown properly as they should in my webpage in localhost except for phpmyadmin!! They show like "فريق الرؤيا الجديدة"
What I did actually is that I have copied the mysql DB data as they are to /var/lib/mysql and gave permission to them using sudo chmod 777.
I noticed that my DB took the default collation which is latin1_swedish_ci
Back in windows I didn't have to set the collation when creating a database, all I had to do is to choose the collation as "ar-win1256" first when login into phpmyadmin before I create or do anything with the data. But here, I found it as latin1_swedish_ci by default! As I mentioned, data are shown properly on the webpage but are shown like latin in the tables in phpmyadmin!
I exported the data into sql files, then dropped the database and re-created it with the collation cp1256_general_ci which is the collation for arabic. After that I imported the sql data and where all set as cp1256_general_ci and I could see them in correct arabic characters in phpmyadmin. But when I opened my webpage in localhost they appeared like "????? ???? ???????? ???"
What is wrong? How can I set the collation to get arabic shown correctly in phpmyadmin tables and on the webpage?
Hope someone knows the solution.
Thanks.
Isos
I am having a collation problem in mysql. My problem has nothing to to with programming, but since Mysql is used by programmers so I thought you'd help me guys so please bare with me a little bit!
I have a christian arabic website and I've first developed it in windows using IIS and then apache servers. Everything went good with the collations and theser stuff, so I was able to view my retrieved data in correct arabic characters in my webpage with localhost, and was able to view them properly with phpmyadmin.
Now after I moved to linux, everything was ok and could continue developing my website and arabic characters are shown properly as they should in my webpage in localhost except for phpmyadmin!! They show like "فريق الرؤيا الجديدة"
What I did actually is that I have copied the mysql DB data as they are to /var/lib/mysql and gave permission to them using sudo chmod 777.
I noticed that my DB took the default collation which is latin1_swedish_ci
Back in windows I didn't have to set the collation when creating a database, all I had to do is to choose the collation as "ar-win1256" first when login into phpmyadmin before I create or do anything with the data. But here, I found it as latin1_swedish_ci by default! As I mentioned, data are shown properly on the webpage but are shown like latin in the tables in phpmyadmin!
I exported the data into sql files, then dropped the database and re-created it with the collation cp1256_general_ci which is the collation for arabic. After that I imported the sql data and where all set as cp1256_general_ci and I could see them in correct arabic characters in phpmyadmin. But when I opened my webpage in localhost they appeared like "????? ???? ???????? ???"
What is wrong? How can I set the collation to get arabic shown correctly in phpmyadmin tables and on the webpage?
Hope someone knows the solution.
Thanks.
Isos