I first checked the charset of MySQL using :
$mysqli = new mysqli("localhost", "root", "sd91ds", "partscatalogue_order");
echo "MySQL Charset : ".$mysqli->character_set_name();
the output was latin1
i then generated an ascii table through php
for($x=0;$x<200;$x++){
echo $x." - &#".$x.";<br>";
}
#163; - £
#156; - œ
when i look in my php.ini file, i have these two lines
default_mimetype = "text/html"
;default_charset =
All my php settings (apart from modules and error reporting) are as a standard installation how can i find out what charset im using in php??? and where is it defined?? is it taking the charset from my system???
I should note that i'm using php and mysql in a windows 2003 environment.
xajax has a file xajax.inc.php and the first few lines are:
if (!defined ('XAJAX_DEFAULT_CHAR_ENCODING'))
{
define ('XAJAX_DEFAULT_CHAR_ENCODING', 'utf-8' );
}
I have decided to change this to
if (!defined ('XAJAX_DEFAULT_CHAR_ENCODING'))
{
define ('XAJAX_DEFAULT_CHAR_ENCODING', 'ISO-8859-1' );
}
to tell xajax to use latin1 charset and therefore fit in with mysql. I am however still in the dark over what charset im using in php? and from liquorvicar's post above i am confused over the multibyte string functions.
If i access the Mysql console and extract the data that has issues, it is an 'accented u' and not a £