Groups | Blog | Home
all groups > dotnet web services > august 2005 >

dotnet web services : carriage return in a string disappears


Marvin Smit
8/30/2005 12:00:00 AM
Hi,

- Are you crossing OS boundries?
- Which toolkits are used? (Server & Client)

Marvin Smit.


On Tue, 30 Aug 2005 02:38:10 -0700, sys
[quoted text, click to view]
sys
8/30/2005 2:38:10 AM
I have a web method that returns a string. When I return a string that has a
carriage return and line feed in it ("\r\n") on the client side I only
receive a string including the line feed ("\n"). The carriage return
disappeared.
sys
8/30/2005 4:25:02 AM
Thanks for your answer.
The server and the client are using the same OS. The effect appears even if
the server and the client run on the same machine. I don't use any special
toolkits.
The error is very easy to reproduce, just make a call to the following web
method:

[WebMethod]
public string Test()
{
return "\r\n";
}

On the client I get only "\n" as result.


[quoted text, click to view]
AddThis Social Bookmark Button