title: MSSQL + PHP - Error to insert oriental char
body: <p>I'm having a problem to insert a oriental character with bind variables in SQL Server. 
  i'm using MSSQL commands and PHP.</p>
  
  <p>My PHP code is like this:</p>
  
  <pre><code>$sql = "
      CREATE TABLE table_test
        (  id                int
          ,nvarchar_latin    nvarchar(255) collate sql_latin1_general_cp1_ci_as 
        );";
  
      $stmt = mssql_query($sql);
  
      $conn = mssql_connect("server","user","pass");
      mssql_select_db('test')
  
      $stmt = mssql_init('test..sp_chinese', $conn); 
  
      $id      = 1;      
      $nvarchar_latin  = '重建議';
  
      mssql_bind($stmt, '@id'          , $id            , SQLINT1);  
      mssql_bind($stmt, @nvarchar_latin, $nvarchar_latin, SQLVARCHAR); 
  
      mssql_execute($stmt);
  </code></pre>
  
  <p>My procedure is like this:</p>
  
  <pre><code>ALTER PROCEDURE sp_chinese
    @id               int
   ,@nvarchar_latin   nvarchar (255) 
  AS 
   BEGIN
   INSERT INTO char_chines (id, nvarchar_latin) 
        VALUES (@id, @nvarchar_latin);
   END
  </code></pre>
  
  <p>this work if I change the oriental characters for normal one.
  if I run directly this insert, it work's fine:</p>
  
  <pre><code>INSERT INTO table_test (id, nvarchar_latin) 
       VALUES (1, '重建議');
  </code></pre>
  
  <p>So, cleary the problem is when I send the variable from PHP to SQL Server.</p>
  
  <p>Anyone have a clue how to make this works? some casting or something?</p>
  
  <p>Thanks!</p>