Hi,
I've been struggling to find a solution this problem, I have found the following php script:
This however does not do what it says on the tin, instead it just changes the table collation to utf8_general_ci , what I need is for it to change the fields as well as these are remaining the same.
Is there a fast way to do this?
The reason why i 'think' i need to do this is so that i can server up pages AND RSS feeds encoded in the utf-8 format, as I am having trouble with wierd characters in my feed.
Thanks,
Chromis
I've been struggling to find a solution this problem, I have found the following php script:
Code:
<?php
$db = mysql_connect('localhost','myuser_mydbuser','mypassword');
if(!$db) echo "Cannot connect to the database - incorrect details";
mysql_select_db('myuser_mydbname'); $result=mysql_query('show tables');
while($tables = mysql_fetch_array($result)) {
foreach ($tables as $key => $value) {
mysql_query("ALTER TABLE $value COLLATE utf8_general_ci");
}}
echo "The collation of your database has been successfully changed!";
?>
Is there a fast way to do this?
The reason why i 'think' i need to do this is so that i can server up pages AND RSS feeds encoded in the utf-8 format, as I am having trouble with wierd characters in my feed.
Thanks,
Chromis
Comment