472,141 Members | 1,037 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,141 software developers and data experts.

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 1705

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 leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.