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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
36 - 30 = ?
Subscribe to this entry?

 
 [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 06:01:29 2024 UTC