#37879 [Asn->Bgs]: Wrong Character Encoding, Loses Characters

From: Date: Sun, 07 Jan 2007 19:15:28 +0000
Subject: #37879 [Asn->Bgs]: Wrong Character Encoding, Loses Characters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-107290@lists.php.net to get a copy of this message
ID: 37879 Updated by: fmk@php.net Reported By: captainqwark at gmail dot com -Status: Assigned +Status: Bogus Bug Type: MSSQL related Operating System: Windows XP PHP Version: 5.1.4 Assigned To: fmk New Comment: Use the MSSQL Client library settings to specify the convertion (ANSI to OEM). The PHP extension does not perform any encoding of the data it's all done in the client library. Previous Comments: ------------------------------------------------------------------------ [2006-06-21 22:31:21] captainqwark at gmail dot com Description: ------------ Retrieving data from a mssql database using ISO-8859-1 internaly returns wrong characters for french characters. Reproduce code: --------------- $mssql = mssql_connect("-","-","-"); if(!$mssql){ echo "connect failed\r\n"; } else { echo "connect successful\r\n"; } mssql_select_db("contacts",$mssql); $selectSQL = "SELECT first_name FROM contacts ORDER BY username"; $result = mssql_query($selectSQL, $mssql); while ($row = mssql_fetch_array($result)) { echo $row['first_name']; } Expected result: ---------------- Josée Actual result: -------------- Jos‚ ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37879&edit=1

« previous php.bugs (#107290) next »