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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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: Sun Mar 03 18:01:32 2024 UTC