I've used the PHP function iconv() to convert greek text from an .mdb file from Windows-1253 to UTF-8 in order to display them on a website instead of having question marks. At first I succeeded while testing my script using XAMPP on my local machine and the greek text was shown properly in the browser. I also asked a question on how to do it here:
Cannot display Greek characters .mdb file (PHP & ODBC)
However, when I uploaded the website on my Godaddy's Windows server, the question marks reappeared. I tried removing the iconv() function to see if the results were different, and they were indeed different (different sort of encoding apparently but still question marks instead of proper greek characters). So, as far as I understand, the function iconv() works but the characters are not shown in the page. I tried using other browsers with no luck. The html charset is set to utf-8 in the headers. Could it be a problem with the hosting plan? The rest of the text in the page (mostly Greek) is shown properly apart from the text that is extracted from the database.
Any help would be appreciated,
Kyris
edit: php test code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Test Page</title>
</head>
<body>
<?php
require('access.php');
$temptype = 'Gardener';
$q = "SELECT TOP 1 ExpenseAccountGreek FROM ExpenseAccount WHERE ExpenseAccount = '$temptype'";
$r = @odbc_exec($dbc,$q);
$greektype[0] = @odbc_fetch_array($r);
$paymentsT[0]['Type'] = iconv('Windows-1253','UTF-8',$greektype[0]['ExpenseAccountGreek']);
echo $paymentsT[0]['Type'];
@odbc_close($dbc);
?>
</body>
</html>