php.net |  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
Votes:1
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: captainqwark at gmail dot com
New email:
PHP Version: OS:

 

 [2006-06-21 22:31 UTC] 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?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-07 19:15 UTC] fmk@php.net
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: Fri Mar 29 09:01:28 2024 UTC