Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I have Thai,Japan,Korea Character (3 Fields) in Access file.
I created a script in PHP to connect to this file
but character on display is shown ??????? ??????? and ??????
What to SET to show normal character
This is my script
<title>TEST</title>
</head>
$objConnect = odbc_connect("test","","") or die("Error Connect to Database");
$strSQL = "SELECT * FROM table1";
$objExec = odbc_exec($objConnect, $strSQL) or die ("Error Execute [".$strSQL."]");
<table width="600" border="1">
<th width="20"> <div align="center">ID </div></th>
<th width="30"> <div align="center">Thai </div></th>
<th width="30"> <div align="center">Korea </div></th>
<th width="30"> <div align="center">Japan </div></th>
while($objResult = odbc_fetch_array($objExec))
<td><?=$objResult["ID"];?></div></td>
<td><?=$objResult["Thai"];?></td>
<td><?=$objResult["Korea"];?></td>
<td><?=$objResult["Japan"];?></div></td>
</table>
odbc_close($objConnect);
</body>
</html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TEST</title>
</head>
<title>TEST</title>
$objConnect = odbc_connect("test","","") or die("Error Connect to Database");
odbc_exec($objConnect, "SET NAMES 'UTF8'");
odbc_exec($objConnect, "SET client_encoding='UTF-8'");
Or try in line :
<td><?=mb_convert_encoding($objResult["Japan"], "SJIS");?></td>
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.