04-24-2010, 03:18 AM
I'm using some special characters in dokument names, keyword etc. They are well represented when are entered in form, but after they are the stored in database they become messed.
First thing that should be done is to add red line in the function htmlStartPage in inc.ClassUI.php
Second thing I do is to convert mydms database to utf8 character set using below attached php script. Script should be edited according to db setup (host, username, pass)
I don't know if that should stay in bugs section or this should go somewhere else, but I hope that administrator will
First thing that should be done is to add red line in the function htmlStartPage in inc.ClassUI.php
Quote: function htmlStartPage($title="", $bodyClass="") {
global $theme, $settings;
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\n".
"\"http://www.w3.org/TR/html4/strict.dtd\">\n";
echo "<html>\n<head>\n";
echo "<meta http-equiv='content-type' content='text/html; charset=UTF-8' />";
echo "<link rel=\"STYLESHEET\" type=\"text/css\" href=\"../styles/".$theme."/style.css\"/>\n";
echo "<link rel=\"STYLESHEET\" type=\"text/css\" href=\"../styles/print.css\" media=\"print\"/>\n";
echo "<link rel='shortcut icon' href='../styles/".$theme."/favicon.ico' type='image/x-icon'/>\n";
echo "<title>".(strlen($settings->_siteName)>0 ? $settings->_siteName : "MyDMS").(strlen($title)>0 ? ": " : "").$title."</title>\n";
echo "</head>\n";
echo "<body".(strlen($bodyClass)>0 ? " class=\"".$bodyClass."\"" : "").">\n";
}
Second thing I do is to convert mydms database to utf8 character set using below attached php script. Script should be edited according to db setup (host, username, pass)
Quote:<?php
// your connection
mysql_connect("localhost","root","");
mysql_select_db("mydms");
// convert code
$res = mysql_query("SHOW TABLES");
while ($row = mysql_fetch_array($res))
{
foreach ($row as $key => $table)
{
mysql_query("ALTER TABLE " . $table . " CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci");
echo $key . " => " . $table . " CONVERTED<br />";
}
}
?>
I don't know if that should stay in bugs section or this should go somewhere else, but I hope that administrator will
