askbook / csharp-sqlite

Automatically exported from code.google.com/p/csharp-sqlite
Other
0 stars 0 forks source link

chinese charset #93

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. SQLiteClient.SqliteCommand.CommandText="Insert Into T1(v1)values('中文')"; 
// values context is 'chinese'

What is the expected output? What do you see instead?
expected output '中文' (chinese),but I see ??????

What version of the product are you using? On what operating system?
version is csharp-sqlite_3_7_5. My OS is WIN7 x64

Please provide any additional information below.

in File Community.CsharpSqlite.SQLiteClient/SqliteCommand.cs Line 107
    public string CommandText
    {
      get ...
      set
      {
        ASCIIEncoding ascii = new ASCIIEncoding();
        sql = ascii.GetString( Encoding.UTF8.GetBytes( value ) );
        prepared = false;
        // ascii->utf8 it is wrong to change ascii directly to  utf8 ,which is unseay be discovered in English char,but is obvious in Chinese char      
      }
    }

Original issue reported on code.google.com by ZGSXTY...@gmail.com on 5 Mar 2011 at 1:00

GoogleCodeExporter commented 8 years ago
public string CommandText
    {
      get ...
      set
      {
        sql = value;   
      }
    }
This is correct.
 sorry, my English is very very not good

Original comment by ZGSXTY...@gmail.com on 5 Mar 2011 at 1:31

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 3348f9c076.

Original comment by noah.hart@gmail.com on 6 Mar 2011 at 3:23