Some Update.
UTF-8 and internet explorer and more than anything Greek are not the easiest to work with. I gave up on the notion even.
I tried version 0.7rc2 - I tried setting it up via the config.php, but still got the same results. Somehow with utf-8 encoding I cant see anything with internet explorer - although I can see it with Firefox, but still it does seem a bit impractical as far as Greek chars are concerned. As the encoding needs to be ISO-8859-7 (or sometimes can use windows-1253), I tried it also, but got the same result as before.
In the end it seems that it all comes back to the htmlentities() function which unfortunately does not support Greek character encoding, so it reverts the encoding to its default ISO-8859-1 - and thus the Greek text gets converted.
I had encountered somethign similar before while reading some forums some time back and after some more searching found the code that I had saved from that dialogue.
Now this is not my code - so I am not claiming any credit for it- unfortunately I cant remember the forum so I cant either give credit to the opriginal author, sorry about that.
You need to add this function and then
you can replace all instances of htmlentities with fix_htmlentities and it seems to work perfectly. So I thought I should share it with you in case it helps anyone.
/**
* HMMMMMMMMMMMMMMMMMMMMM
*
*
*
*/
function fix_htmlentities($string, $param=ENT_QUOTES, $charset="ISO-8859-7")
{
//---------------------------------------------------------------^^^^^^^
// set your own charset!!!
//
// uncomment if htmlentities does not support your charset
return my_htmlentities($string);
return htmlentities($string, $param, $charset);
}
function my_htmlentities($val) {
if ($val == "")
{
return "";
}
$val = str_replace( " ", " ", $val );
//Remove sneaky spaces
// $val = str_replace( chr(0xCA), "", $val );
$val = str_replace( "&" , "&" , $val );
$val = str_replace( "" , "-->" , $val );
$val = preg_replace( "/" , ">" , $val );
$val = str_replace( "" , $val );
$val = preg_replace( "/\\$/" , "$" , $val );
// Uncomment it if you need to remove literal carriage returns
//$val = preg_replace( "/\r/" , "" , $val );
$val = str_replace( "!" , "!" , $val );
$val = str_replace( "'" , "'" , $val );
// Uncomment if you need to convert unicode chars
// $val = preg_replace("/&#([0-9]+);/s", "&#\1;", $val );
// Strip slashes if not already done so.
if ( get_magic_quotes_gpc() )
{
$val = stripslashes($val);
}
// Swop user inputted backslashes (this caused an error so
// I commented it)
// $val = preg_replace( "/\(?!&#|?#)/", "\", $val );
return $val;
}
//------------------------
Hope it helps
Cheers
