|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37879 Wrong Character Encoding, Loses Characters
Submitted: 2006-06-21 22:31 UTC Modified: 2007-01-07 19:15 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: captainqwark at gmail dot com Assigned: fmk (profile)
Status: Not a bug Package: MSSQL related
PHP Version: 5.1.4 OS: Windows XP
Private report: No CVE-ID: None
 [2006-06-21 22:31 UTC] captainqwark at gmail dot com
Retrieving data from a mssql database using ISO-8859-1 internaly returns wrong characters for french characters.  

Reproduce code:
	$mssql = mssql_connect("-","-","-");
		echo "connect failed\r\n";
	} else {
		echo "connect successful\r\n";

	$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:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-07 19:15 UTC]
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.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Mar 02 00:01:28 2024 UTC