fmwviormv / sqlite-net

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

Is suport unicode? #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I try to save unicode like  Thai Language
but it save to ?????????????

If i read a table in exists database (create by other tool)  that contain 
unicode it can read correctly.

Original issue reported on code.google.com by channaro...@gmail.com on 26 Oct 2010 at 4:02

GoogleCodeExporter commented 9 years ago
I checking sqlite-net compact framewoke  modify sqlite3.cs like  it.

now can save data in unicode.

Original comment by channaro...@gmail.com on 30 Oct 2010 at 5:05

GoogleCodeExporter commented 9 years ago
I'm sorry, but I'm unsure what your last comment means.

Does it work for you? Or did you have to modify it? Unicode works for me on iOS.

Original comment by frank.al...@gmail.com on 13 Nov 2010 at 11:10

GoogleCodeExporter commented 9 years ago
Unicode not work.
But, I modify sqlite3.cs and now it work.

Original comment by channaro...@gmail.com on 15 Nov 2010 at 2:28

GoogleCodeExporter commented 9 years ago
Can you please detail what changes you made to sqlite3.cs??

Original comment by sam.w...@gmail.com on 8 Jan 2011 at 12:51

GoogleCodeExporter commented 9 years ago
I have answered my own question.  The CF version forces all strings to UTF8 
before storing them to the database.  

I have attached a diff file containing the modifications I had to make to 
sqlite-net rev 71 if anyone is interested.  

I'm not sure it is the 'right' way of doing it, but it solves my problem for 
the moment.

Cheers
Sam

Original comment by sam.w...@gmail.com on 8 Jan 2011 at 1:28

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry,  I just read new email now.

You think is right, In CF version all strings convert to UTF-8 bytes array and 
store in database.  and in my modify sqlite3.cs  i copy this technique.

In your sqlite71.diff is same as sqlite3.cs that i modify.

Original comment by channaro...@gmail.com on 10 Jan 2011 at 5:22