D
davidjgonzalez
I have a web application written in ASP .NET (VS 2003) which an Adobe
Acrobat Form posts XML to. I am able to get the XML using the
Request.InputStream however the XML is UTF-16 encoded. This means that
the byte[] that i get from the Request.InputStream looks like:
[0]: 255
[1]: 254
[2]: 64
[3]: 0
[4]: 56
[5]: 0
....
essentially every other index in the array holds the value 0.
When i try to convert the byte array to a string, i get <\0x\0\m\0l\0
... (every other character is a \0) .. I also have the '\r\n' character
before the ending tags in the xml.
my question is two fold
1) how can i elegantly convert the UTF-16 formated xml to something
more readable aka UTF-8, ASCII, etc in Visual Studio 2003 (i cant find
any UTF-16 encoding support in VS 2003)
2) If 1 doesnt get rid of the '\r\n's how can i get rid of them?
string.replace("\r\n", "") didnt seem to work.
Thanks
Acrobat Form posts XML to. I am able to get the XML using the
Request.InputStream however the XML is UTF-16 encoded. This means that
the byte[] that i get from the Request.InputStream looks like:
[0]: 255
[1]: 254
[2]: 64
[3]: 0
[4]: 56
[5]: 0
....
essentially every other index in the array holds the value 0.
When i try to convert the byte array to a string, i get <\0x\0\m\0l\0
... (every other character is a \0) .. I also have the '\r\n' character
before the ending tags in the xml.
my question is two fold
1) how can i elegantly convert the UTF-16 formated xml to something
more readable aka UTF-8, ASCII, etc in Visual Studio 2003 (i cant find
any UTF-16 encoding support in VS 2003)
2) If 1 doesnt get rid of the '\r\n's how can i get rid of them?
string.replace("\r\n", "") didnt seem to work.
Thanks