I wrote another Sedna C# library last fall in preparation for using
Sedna in our product, but we eventually went another route. The
library is working in tests, but was never widely enough deployed to
be considered final. That said, it already properly handles the UTF8
issue.
The code is all available under Apache 2.0 license. You can look at
it here [1] or download via svn [2].
Cheers,
- Steve
[1] http://viewvc.mindtouch.com/public/sedna/trunk/
[2] https://svn.mindtouch.com/source/public/sedna/trunk/
--------------
Steve G. Bjorg
http://mindtouch.com
http://twitter.com/bjorg
irc.freenode.net #mindtouch
On Jul 4, 2009, at 3:38 PM, Ivan Shcheklein wrote:
Hi Marek,
Sedna .NET API is written to support only ASCII queries. I've
modified it slightly. Change WriteString method implementation with
the following one:
public static void WriteString(BinaryWriter writer, params
string[] textItems)
{
foreach (string text in textItems)
{
byte[] byte_text = Encoding.UTF8.GetBytes(text);
writer.Write((byte)0);
NetworkOperations.WriteInt(byte_text.GetLength(0),
int_array, 0);
writer.Write(int_array);
writer.Write(byte_text);
}
}
Also change all occurencies of Encoding.ASCII with Encoding.UTF8.
However, I believe that this is not the last bug. I believe you
should review it by yourself if you are going to use it. Happily it
seems quite simple.
Ivan Shcheklein
Sedna Team
2009/7/4 Marek <[email protected]>
HI, here is code example in C# (it is very simple):
Database: Demo2
Document: index
// code
…
SednaSession ses = SednaSession.CreateSession("localhost", "Demo2",
"SYSTEM", "MANAGER");
string q = "update insert <ahoj>č</ahoj> into document(\"index\")";
ses.Execute(q);
ses.CommitTransaction();
ses.Close();
…
// end code
Execution finishes successful.
Document „index“ before execution code:
<?xml version="1.0" standalone="yes"?>
Document „index“ after execution code:
<?xml version="1.0" standalone="yes"?><ahoj>?</ahoj>
Have i nice day
Marek
From: Ivan Shcheklein [mailto:[email protected]]
Sent: Thursday, July 02, 2009 6:38 PM
To: Marek
Subject: Re: [Sedna-discussion] Sedna UTF support problem
Ok. Send me at least code you run.
2009/7/2 Marek <[email protected]>
Yes I mean John Woods.
I do project in C# I need .NET API. Do you know any other API
in .NET? Do you recommend to me?
I dont have file with query, I need save data from API, from my
aplication.
My task is index fileinfo of files in directories and store this
info in xml database.
I need index basic info about file, for example his name . Because I
am from czech republic, users
use discritic (ěščžřýžýáýáíýá) in filename and these
were stored as question mark (??)
example:
„Ponožky“ sedna store like: „Pono?zky“ and Information is
lost and I cannot use it.
THX
From: Ivan Shcheklein [mailto:[email protected]]
Sent: Thursday, July 02, 2009 3:27 PM
To: Marek
Subject: Re: [Sedna-discussion] Sedna UTF support problem
Do you mean John Wood's one? Unfortunately, it's very old and buggy.
I can't recommend you to use it.
Ok, can you send me a file with query in UTF-8?
2009/7/2 Marek <[email protected]>
Sedna.NET
From: Ivan Shcheklein [mailto:[email protected]]
Sent: Thursday, July 02, 2009 2:15 PM
To: Marek
Subject: Re: [Sedna-discussion] Sedna UTF support problem
What API do you use?
2009/7/2 Marek <[email protected]>
Hi Ivan,
I tried it, not working L. In Sedna database is saved ‘?‘
indstead ‘á‘.
First of all, I need use Sedna API.
Thank you
Marek Wija
From: Ivan Shcheklein [mailto:[email protected]]
Sent: Thursday, July 02, 2009 9:24 AM
To: Marek
Cc: [email protected]
Subject: Re: [Sedna-discussion] Sedna UTF support problem
Hi Marek,
You should write your query in file. Then make sure that it's saved
in UTF-8 encoding.
To run this query type command:
se_term -file {query_file_name} {database_name}
Ivan Shcheklein,
Sedna Team
2009/6/30 Marek <[email protected]>
Hi
I am from Czech Republic. I need store chars like
„ěščřžýáí“ (czech diakritics), but error: query bas
encoding,
Example:
Update insert <el>ááááá</el> into doc(“example”)
……..don’t work in term and from API.
Where a can set up encoding of file or database?
Sedna says: support UTF-8, but not working, Why? What is wrong?
Sorry my english
Thank you
Mark
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4197 (20090629) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
------------------------------------------------------------------------------
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4205 (20090701) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4209 (20090702) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
------------------------------------------------------------------------------
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion
------------------------------------------------------------------------------
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion