Greg thanks for the reply but that didn't seem to work..
My scope has slightly changed -- i no longer need UTF-8 encoding
persay, just need to parse the values from the XML that is being sent
over, so i need to convert the byte[] to a readable string.
.. here is my code:
-------------------------------------
Request.InputStream.Read(data, 0,
Convert.ToInt32(Request.InputStream.Length));
UnicodeEncoding encoding = new UnicodeEncoding( );
string decodedString = encoding.GetString(characters);
//at this point decodedString = " ????? ??????????? ?
?????????????????????????????????????????????????????????????????????????????????????????????????????????????"
DataSet ds = new DataSet();
ds = XmlToDataSet(decodedString);
-------------------------------------
when decodedString is passed to XmlToDataSet, it crashes I assume
because XmlToDataSet does not look like the encoding on the
decodedString..
How do i get the byte[] the Request.InputStream yields into a "normal"
encoding?
Thanks
Thus wrote davidjgonzalez@gmail.com,
> Greg thanks for the reply but that didn't seem to work..
>
[quoted text clipped - 15 lines]
> ??????????????????????????????????????????????????????????????????????
> ???????????????????????????????????????"
Your code is not really complete. You're reading into a byte array "data",
but decode something called "characters".
Note that you don't really need to perform these steps yourself, if all you
want to do is fill a DataSet.
aDataSet.ReadXml(Request.InputStream);
should do the trick. The XML infrastructure can figure out the encoding by
itself.
Cheers,

Signature
Joerg Jooss
news-reply@joergjooss.de
davidjgonzalez@gmail.com - 06 Mar 2006 14:23 GMT
oop - thanks for the catch ..
string decodedString = encoding.GetString(characters);
is supposed to read
string decodedString = encoding.GetString(data);
your ReadXml(...) solution from the input stream is just what i needed!
thanks