charset encode: accent problem with MSSQL2008 / PHP5.3.4 / Apache 2.2 and PDO_SQLSRV Driver 2.0

Hello,
I just upgrade to PHP5.3.4/Apache2.2 and MSSQL 2008
I have problem of accent from data that I retrieve from the DB.
the charset encode of the site is iso-8859-1  (and accent from html code are displayed normally)
the charset encode of the DB is FENCH_CI_AS
I saw in many forum that we should define the charset of the DB when connecting to it from PHP but I didn't find the good syntax.....
thanks for your help
bruno_boccaraAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bruno_boccaraAuthor Commented:
With PDO_SQLSRV Driver, there is no mssql.charset .
mssql library do not work anymore with PHP 5.3.4
PDO_SQLSERV 2.0 is the new library that replace it.
I saw in php site that we could include the charset during the connection but when I try to do this, it doesn't work...(could not connect to server).
http://php.net/manual/en/book.pdo.php
<?php
$db = new PDO('dblib:host=your_hostname;dbname=your_db;charset=UTF-8', $user, $pass);
?>

is this because I try to make the DB in utf-8 and the DB charset is french_ci_as ?.

I'm searching for 2 days......getting crazy...

bruno_boccaraAuthor Commented:
I have the solution !!!!!

http://msdn.microsoft.com/en-us/library/ff628164(v=sql.90).aspx

$iConnect->setAttribute( PDO::SQLSRV_ATTR_ENCODING, PDO::SQLSRV_ENCODING_SYSTEM  );

by default the Connection is in UTF-8....

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Ovunc TukenmezSoftware DeveloperCommented:
i'm glad you've solved the problem.
bruno_boccaraAuthor Commented:
thank you.
bruno_boccaraAuthor Commented:
I found by myself the solution.....

thanks to jet-black for his help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.