title: Working with characters with accents in sql query and table name
body: <p>I'm doing some php &amp; SQL Server 2005 in a database with accents ( é , è , à ) in both tables names , columns names and fields . Unfortunately , I'm not the owner/creator of this database , but I agree that the owner must be slapped :) .</p>
  
  <p>Im using ODBC driver to connect to the SQL Server <code>odbc_connect($dsn,$user,$password)</code>.</p>
  
  <p>My problem is that every fields with accents is not recognized .
  For example : despite having 7000 fields with the name "Réseau"</p>
  
  <pre><code>$query="Select * from dbo.Table where col1= 'Réseau'"
  </code></pre>
  
  <p>gives 0 results  <code>No rows found</code></p>
  
  <p>Same thing for :</p>
  
  <pre><code>$query="Select * from [dbo].[Tablé] 
  </code></pre>
  
  <p>giving an sql error : </p>
  
  <pre><code>Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Object name 'dbo.TablÃ©' not valid., SQL state S0002 in SQLExecDirect in...
  </code></pre>
  
  <p>And , sadly , none of the tips i found over the net helped , like :</p>
  
  <p>'Réseau' , <code>Réseau</code>, [Réseau] , COLLATE SQL_Latin1_General_Cp437_CI_AI/French_CI_AS ... </p>
  
  <p>For more info , I'm using charset UTF-8 , my database collate is French_CI_AS .
  And all the querys above works perfectly on Access or Query Tools (Using ODBC) .</p>
  
  <ul>
  <li><strong>* <em>EDITED to clarify more *</em></strong> </li>
  </ul>