[PHP-DB] Any hints lantin1 utf-8
Would you please give any suggestions or hints about storing data into MySQL. I have a site where I use MySQL database to store usually Arabic texts. I use a custom contorl panel to store/retrieve the Arabic texts from the database. Everything up to now is OK. But When I try to open the database directly using (say phpmyadmin) the Arabic texts does not appear correctly. Its appears something like 'ãä ÇáÐí äÇÕÑ ÅÓÑÇÆíáÇð ¿'. The default charset of the database/table is latin1. I know it's a matter of encoding used. But how can I be able to view the data directly correctly ??? _ Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Any hints lantin1 utf-8
Hi If you're storing non-latin character in a latin-1 table you are bound to get this problem. phpMyAdmin is simply showing you what you put there as far as it is concerned. You should switch to using an alternative encoding for the character set. UTF-8 would likely be best for you. Back up all the data before making the change, or it WILL be corrupted. If you primarily use non-latin character sets, I'd recommend making UTF-8 the default database character set Niel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Any hints lantin1 utf-8
Thanks Neil, But what would be the best way to convert my Arabic Texts which were stored through a php script into a latin1 table back to UTF-8. I wonder WHY is it displayed correctly when retrieved through the php scripts (!!??) M. From: Niel Archer [EMAIL PROTECTED] Reply To: php-db@lists.php.net To: php-db@lists.php.net Subject: Re: [PHP-DB] Any hints lantin1 utf-8 Sent: Friday, November 24, 2006 5:56 PM Hi If you're storing non-latin character in a latin-1 table you are bound to get this problem. phpMyAdmin is simply showing you what you put there as far as it is concerned. You should switch to using an alternative encoding for the character set. UTF-8 would likely be best for you. Back up all the data before making the change, or it WILL be corrupted. If you primarily use non-latin character sets, I'd recommend making UTF-8 the default database character set Niel From: Abu Mosaab [EMAIL PROTECTED] To: php-db@lists.php.net Subject: Any hints lantin1 utf-8 Sent: Friday, November 24, 2006 12:48 PM Would you please give any suggestions or hints about storing data into MySQL. I have a site where I use MySQL database to store usually Arabic texts. I use a custom contorl panel to store/retrieve the Arabic texts from the database. Everything up to now is OK. But When I try to open the database directly using (say phpmyadmin) the Arabic texts does not appear correctly. Its appears something like 'ãä ÇáÐí äÇÕÑ ÅÓÑÇÆíáÇð ¿'. The default charset of the database/table is latin1. I know it's a matter of encoding used. But how can I be able to view the data directly correctly ??? _ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Any hints lantin1 utf-8
Hi I don't use phpMyAdmin myself and I can't remember if it supports UTF-8 encoding Whichever extension that your PHP is using is likely doing a conversion. this is something that the MySQL libraries handle. You can use this to extract the data from the tables and save it. As a test, dump a table's data into a file (have mysqldump, or phpMyAdmin create insert statements for the data). Create a table with UTF-8 encoding and attempt to process that file into it (copy/paste into phpMyAdmin if it's not to big) If that works, then you can go ahead and back up all your tables this way, and enter it into your new UTF-8 ones Without knowing more about your configuration (local/remote, versions, etc.) I can't suggest much else. Niel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php