From:             [EMAIL PROTECTED]
Operating system: windows 2000
PHP version:      4.1.2
PHP Bug Type:     MSSQL related
Bug description:  bug for french characters 

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
-- 
Edit bug report at http://bugs.php.net/?id=16163&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16163&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16163&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16163&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16163&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16163&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16163&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16163&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16163&r=submittedtwice

Reply via email to