this website is rather old but i can remember that it was 2.3.2
anyway, in a short sentence i should state that I solved this issue too.
firstly i should stated that it is not the Xhelp issue but a xoops update/upgrade issue because i have this problem with every other module that i installed in the website after upgrading to xoops 2.5.5.
So, it is better to continue in another new topic after more test and try because i suspect that it is a xoops 2.5.5 issue.
To solve my issue in this specific website i did the following:
I tried to convert all tables to utf-8 again.
at the first i tried below script from trabis but it failed. this script even can not convert latin1 tables/structures to utf-8 in my old test databse.
topic:
https://xoops.org/modules/newbb/viewtopic.php?post_id=341123#forumpost341123link:
http://code.google.com/p/xuups/downloads/detail?name=dbupdate_1.1.zip
So i advise to not use this one.
Then i tried another older script introduced here:
https://xoops.org/modules/newbb/viewtopic.php?post_id=321964#forumpost321964
should be saved in your root website beside mainfile.php and with convert.php name.
<?php
ini_set ('max_execution_time', '6000');
include_once 'mainfile.php';
// ??????????? ??????
if( ! empty( $_POST['convert'] ) ) {
include XOOPS_ROOT_PATH.'/header.php';
$old_prefix = XOOPS_DB_PREFIX;
$srs = $xoopsDB->queryF( 'SHOW TABLE STATUS FROM `'.XOOPS_DB_NAME.'`' ) ;
if( ! $xoopsDB->getRowsNum( $srs ) ) die( "You are not allowed to copy tables" ) ;
$count = 0;
while( $row_table = $xoopsDB->fetchArray( $srs ) ) {
$count ++ ;
$old_table = $row_table['Name'] ;
// ???? ?????? ??????? ?? ???????? ???????? ??????, ?? ??????????...
if( substr( $old_table , 0 , strlen( $old_prefix ) + 1 ) !== $old_prefix . '_' ) continue ;
// ???????????? ??????? ? utf8
$sql = 'ALTER TABLE `'.$old_table.'` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci';
if($xoopsDB->queryF($sql)) {
echo 'ok - '.$sql.'<br />';
} else {
echo $xoopsDB->error().' - '.$sql.'<br />';
}
// ????????????? ????????? ????????????? ??????
$sql = 'ALTER TABLE `'.$old_table.'` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci';
if($xoopsDB->queryF($sql)) {
echo 'ok - '.$sql.'<br />';
} else {
echo $xoopsDB->error().' - '.$sql.'<br />';
}
}
// ????????????? ????????? ???? ??????
$sql = 'ALTER DATABASE `'.XOOPS_DB_NAME.'` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci';
if($xoopsDB->queryF($sql)) {
echo 'ok - '.$sql.'<br />';
} else {
echo $xoopsDB->error().' - '.$sql.'<br />';
}
include XOOPS_ROOT_PATH.'/footer.php';
// ????? ?????
} else {
include XOOPS_ROOT_PATH.'/header.php';
xoops_confirm(array('convert' => 1), 'convert.php', 'Convert in utf8?');
include XOOPS_ROOT_PATH.'/footer.php';
}
?>
it works and the charming point is now the new installed modules are utf-8.
So again i should stated that we should test the xoops 2.5.5 upgrade script in converting database from latin1 to utf-8 because i think it is failed to do it right.
My main big very old website is still latin1 and i need to know how to convert tables using the xoops official upgrade script when i already upgrade to 2.5.5 and keep the charset as latin1?
i think a good tool to add to the maintenance in the next xoops versions (maybe 2.6) is the ability to convert charset from latin1 to utf8