The original message is deleted because I used too many characters; sorry
The problem, that looked like a bug, had to do with how the Forum and the Wiki (that only have one field for Title and Category, etc) deal with non-standard letters from, say, the European and Scandinavian alphabet. This issue only effected the Title and Category names in the Forum but, because users can create Titles and Category names from within Wiki entries, effects the whole of the Wiki.
And the simple answer is that the underlying mySQL database must have both TABLES and COLUMNS (that by default are set to latin1_swedish_ci) set to utf8_general_ci (though some believe the columns are best set to utf_bin; although I have not tried this).
Any attempt to use direct obfuscation in Wiki entries, for example;
é or é
appears be re-written to ascii by the Wiki engine, to;
é - without the leading zero or double-zero
Any attempt to use direct obfuscation in Wiki titles or categories, for example;
[[é]] or [[Category:é]]
apears to be completely ignored.
Simply keying these characters from the keyboard works fine, however at the current time I cannot make them display correctly in all places unless the EE {charset} tag is also set to UTF-8 [however this may simply because more work is needed].
If your database is set to the default and needs both tables and columns changing the PHP code in the entry at the end of this thread DOES NOT WORK. Try this instead;
<?php
// Fill in your configuration below
$db_server = 'localhost';
$db_user = '';
$db_password = '';
$db_name = '';
// Do not change anything below this
// set_time_limit(0);
header('Content-type: text/plain');
$connection = mysql_connect($db_server, $db_user, $db_password) or die( mysql_error() );
$db = mysql_select_db($db_name) or die( mysql_error() );
$sql = 'SHOW TABLES';
if ( !($result = mysql_query($sql)) )
{
print '<span style="color: red;">SQL Error: <br>' . mysql_error() . "</span>\n";
}
// Loop through all tables in this database
while ( $row = mysql_fetch_row($result) )
{
$table = mysql_real_escape_string($row[0]);
$sql2 = "ALTER TABLE $table DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci";
if ( !($result2 = mysql_query($sql2)) )
{
print '<span style="color: red;">SQL Error: <br>' . mysql_error() . "</span>\n";
break;
}
print "$table changed to UTF-8 successfully.<br>\n";
// Now loop through all the fields within this table
$sql3 = "SHOW COLUMNS FROM $table";
if ( !($result3 = mysql_query($sql3)) )
{
print '<span style="color: red;">SQL Error: <br>' . mysql_error() . "</span>\n";
break;
}
while ( $row3 = mysql_fetch_row($result3) )
{
$field_name = $row3[0];
$field_type = $row3[1];
// Change text based fields
$skipped_field_types = array('char', 'text', 'blob', 'enum', 'set');
foreach ( $skipped_field_types as $type )
{
if ( strpos($field_type, $type) !== false )
{
$sql4 = "ALTER TABLE $table CHANGE `$field_name` `$field_name` $field_type CHARACTER SET utf8 COLLATE utf8_bin";
if ( !($result4 = mysql_query($sql4)) )
{
print '<span style="color: red;">SQL Error: <br>' . mysql_error() . "</span>\n";
break 3;
}
print "---- $field_name changed to UTF-8 successfully.<br>\n";
}
}
}
print "<hr>\n";
}
mysql_close($connection);
?>
I have attached a script that does work but please, please do not run this script on a production database without first testing it completely or having your host technical support validate or run it for you.
NB Any foreign characters keyed into any part of EE whilst the EE general configuration -> charset = latin-1 appear to be corrupted if general configuration -> charset is later changed to utf-8 (or visa-versa); the best way to address this if you need to make the changes is to use admin -> utilities -> find and replace to change them back again.
NNB the Wiki pMCode does however contain a bug an irritating feature that changes composite non-seo-friendly urls in Wiki entries, that can only be overcome by obfuscation. Any links to applications, like Open-Realty, that use both ampersands and square-brackers in urls need all three characters obfuscated or else the Wiki engine will corrupt them. For example;
http://www.open-realty.com/index.php?action=searchresults&pclass;[]=1
GRRRRR, even with code tags I cannot stop EE from adding the semi-colon - believe me when I enter the above URL there’s no semi-colon in it; I call this a bug!
will be re-written to (note the semi-colon after pclass);
http://www.open-realty.com/index.php?action=searchresults&pclass;[]=1
In addition the Wiki engine uses pMCode so having square-brackets is a no-no anyway. to make this link work first obfuscate the ampersand to overcome the bug, then obfuscate the square-brackets ot overcome the pMCode parser.
http://www.open-realty.com/index.php?action=searchresults&pclass[]=1
