469,644 Members | 1,952 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,644 developers. It's quick & easy.

How to encode/decode carriage return line feeds

I am having a problem in which ASP.Net web services are corrupting my data.
I know that my problem is related to the standard way of encoding carriage
return linefeeds, so I need to figure out how to correctly encode them.

I am trying to return XML strings that were generated by calling
DataTable.WriteXml() from my web service, and then using DataTable.ReadXml
to deserialize the data. The problem is that some of the data in the
datatable is text, and that text might contain carriage return / linefeeds.
These carriage return linefeeds are being altered at the web services
layer - converted into just newlines.

When I receive the data on the client end, all of the linefeed characters
are stripped out. Now, I could just brute-force the linefeeds back in, but
I would much rather do it right. Is there a way to tell the encoder "Hey,
this is data payload -- Don't alter it"?

If not, is there a "right" way to cause the \r\n's that have been encoded as
\n's to be decoded back to \r\n's?


Sep 26 '06 #1
0 1523

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Laura D | last post: by
4 posts views Thread by Darrel | last post: by
6 posts views Thread by 7stud | last post: by
1 post views Thread by anonymous | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.