php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16163 bug for french characters
Submitted: 2002-03-19 06:25 UTC Modified: 2002-03-19 07:43 UTC
From: cris at tellme dot net Assigned:
Status: Not a bug Package: MSSQL related
PHP Version: 4.1.2 OS: windows 2000
Private report: No CVE-ID: None
 [2002-03-19 06:25 UTC] cris at tellme dot net
Here is the script that is supposed to insert in a MS SQL Server database some data including special french characters:

<?
        // establish connection to database
	setlocale("LC_ALL","french"); 
	$li=mssql_connect("server", "user","password");
	$db=mssql_select_db('database',$li);
 
         // text to insert, written in french
	$test='voil? ?a c&#039;est la probl?me';
 
	$query="insert into toto values ('".$test."')";
	$rez = mssql_query("SET LANGUAGE french");
	$rez = mssql_query($query);

        // extract from db the data just inserted
	$query="SELECT test from toto";
	$qresp=mssql_query($query);
	$toto = mssql_fetch_array ($qresp);

        // display the result
	echo $toto[0]; 
	mssql_close($li);
?>

Here is what the database contains:
     voila ta c&#039;est la problFme

No french special characters at all.


Cris Badea
Web Developer
Tellme SA

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-19 07:43 UTC] sander@php.net
Do NOT reopen a new report, reopen the old one.
 [2002-03-21 03:35 UTC] cris at tellme dot net
is this a bug or not???? just anser me!!!!!!!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC