eeinfalt / csharp-sqlite

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

select issue of Chinese character '大' #151

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I'm using the latest version of csharp-sqlite
2.I want to select a row from db ,just like SELECT * FROM test where 
name='大',but i can insert '大' to database..
3.大 is a Chinese character.

What is the expected output? What do you see instead?
It expected that will be shown a row there the name='大',but it says 
unrecognized token:"'大"

What version of the product are you using? On what operating system?
I'm using csharp-sqlite_3_7_7_1_71.zip ,win7 64bit to develop, and develop for 
windows phone 7.1 sdk

Please provide any additional information below.

thank you very much

Original issue reported on code.google.com by sinfias...@163.com on 6 Apr 2012 at 2:18

GoogleCodeExporter commented 9 years ago
It is because tokenize_c.cs casts a unicode char to byte where the higher byte 
is lost and the some chinese characters are processed as ascii then caused the 
parse error.

I made some small changes where at lease the select of chinese characters works 
fine (enough for me), hope this helps to fix this issue and other potential 
similar problems.

Original comment by brigh...@gmail.com on 9 Apr 2012 at 1:33

Attachments:

GoogleCodeExporter commented 9 years ago
@bright2k@gmail.com

I must offer my heartfelt thanks to you.
The problem was solved the brilliantly.
Thank you !

Original comment by sinfias...@163.com on 10 Apr 2012 at 1:29

GoogleCodeExporter commented 9 years ago
Thank you, patch added into current release

Original comment by market.n...@gmail.com on 10 Apr 2012 at 1:40