problem with \r\n and \n (when passing multi line string arguement)

I

In-Ho Yi

When I call a webmethod from my application, the enter
code is encoded as "\r\n" (which is default,
Environment.NewLine), when this string arguement is passed
to the web method, the enter code becomes "\n". Problem
with XML serialization, perhaps? Is there any attribute
that I can set to prevent this conversion?
 
V

Vitaly Filimonov [MSFT]

This is a side effect of the end-of-line normalization in Xml (see
http://www.w3.org/TR/REC-xml#sec-line-ends section 2.11). SO, it is by
deisgn.

This can be annoying when Xml "end of line format" does not match your goal
(say, Smtp end of line has to be \r\n, not \n for proper delivery on all
clients) and the only way around it, I guess, is replacing \n with \r\n on
the receiver.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top