nzseries1 Posted March 26, 2007 Share Posted March 26, 2007 Hi everyone, Can someone please tell me how come my unicode is getting replaced by question marks? In my database I have three unicode first names, and one name "John". As you can see, the encoding on my resulting web page is correct as the first two chinese characters print correctly (well they do on my display). Here is the output (the code is displayed below): -------------------------------- [pre]TEST - 河南 First Name: ?? First Name: ?? First Name: ?? First Name: John[/pre] -------------------------------- CODE IS AS FOLLOWS: $db = getcwd().'\..\..\testdb.mdb'; $conn = new COM('ADODB.Connection'); $conn->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=$db"); $query = "SELECT firstname FROM Trainers"; $result = $conn->execute($query); print("TEST - 河南"."<BR><BR>"); while (!$result->EOF) { print("First Name: ".$result->Fields["firstname"]->value."<BR>"); $result->MoveNext(); } When I view the table in Microsoft Access, the unicode characters display correctly. Any help to determine why question marks appear in the resulting php would be very useful. Thanks very much in advance, Matthew Link to comment https://forums.phpfreaks.com/topic/44421-php-adodb-and-unicode/ Share on other sites More sharing options...
mattd8752 Posted March 27, 2007 Share Posted March 27, 2007 PHP doesn't work exactly well with unicode. Last I heard people are whining on php.net and expecting it to be in PHP6. But some support may have been added sometime recently unnoticed. Link to comment https://forums.phpfreaks.com/topic/44421-php-adodb-and-unicode/#findComment-215776 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.