These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: (UTF-8) C# byte array to (UTF-16) SQL Server XML mapping?
PostPosted: Mon Aug 18, 2008 9:16 am 
Newbie

Joined: Thu Feb 09, 2006 3:44 pm
Posts: 5
We're trying to figure out the best way to store and retrieve UTF-8 encoded XML in/from SQL Server 2005. Here are our considerations:

* in our code, we need to operate on UTF-8 encoded XML; we currently use byte arrays to store this XML, since .NET strings are UTF-16 encoded
* the SQL Server XML type is also UTF-16 encoded
* we would like to store our byte arrays in the SQL Server XML type, to (later) benefit from things like full test search on DB level
* we have been experimenting with writing our own XML User Type, as shown in several examples on the web, but they all assume a String as type on the C# side and we have not yet figured out if and how we can map the SQL Server XML type to a C# byte array and how and where the (SQl Server) UTF-16 to (C#) UTF-8 encoding should take place

Is there anyone who has tackled this before and give us some pointers as how to best solve this (UTF-8) C# byte array to (UTF-16) SQL Server XML mapping?

Or does anyone know of another recommended approach for this?

Thanks!

Pascal.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.