phamtanlong / csharp-sqlite

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

Cyrillic letter "Ч #126

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by eraser...@gmail.com on 21 Jul 2011 at 3:55

GoogleCodeExporter commented 8 years ago
Awww, accidentally hit Enter.
When used Cyrillic letter "Ч" in the text of query I get an error like this:  
unrecognized token: "'ИВАНОВИЧ"

Original comment by eraser...@gmail.com on 21 Jul 2011 at 3:59

GoogleCodeExporter commented 8 years ago
This occurs in UPDATE and INSERT queries. 
For example:
cmd.CommandText = "INSERT INTO person (firstname, surname) VALUES ('ИВАН', 
'ИВАНОВИЧ')";

Original comment by eraser...@gmail.com on 21 Jul 2011 at 5:33

GoogleCodeExporter commented 8 years ago
The test project reproducing the bug.

Original comment by eraser...@gmail.com on 21 Jul 2011 at 4:31

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by noah.hart@gmail.com on 22 Jul 2011 at 4:15

GoogleCodeExporter commented 8 years ago
I have seen this error as well, definitely with 'ч' and potentially with other 
Cyrillic characters.  I didn't think much of it since I am only using the 
project for internal testing purposes, but in the end, my project will need 
full Unicode support.

I would be happy to help with the testing, or even the bugfixing of these 
errors.  I know Russian, and French, and I am familiar with debugging Unicode 
in a variety of other languages (Japanese, Chinese, etc...) as well.

Original comment by andrewrb...@gmail.com on 3 Aug 2011 at 2:18

GoogleCodeExporter commented 8 years ago
The SQLiteClientTests.csproj has an example where Japanese is used.  

How is Cyrillic different from Japanese?

Original comment by market.n...@gmail.com on 3 Aug 2011 at 3:51

GoogleCodeExporter commented 8 years ago
If change quotes from single to double, all work fine
command.CommandText = "INSERT INTO person (firstname, surname) VALUES 
(\"ИВАН\", \"ИВАНОВИЧ\")";

Original comment by Transmut...@gmail.com on 25 Aug 2011 at 5:17

GoogleCodeExporter commented 8 years ago

Original comment by noah.hart@gmail.com on 25 Aug 2011 at 4:12

GoogleCodeExporter commented 8 years ago
Solution for Cyrillic character "Ч":
file tokenize_c.cs , line 309
-    if (c == delim)
+    if (z[iOffset + i] == delim)

P.S. Bytewise parsing C# strings (like an ASCIIZ strings) definitely not a good 
idea...

Original comment by sens.boston on 17 Apr 2014 at 9:29