carriage return in a string disappears

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sys

    #1

    carriage return in a string disappears

    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.
    Thanks for any help.
  • Marvin Smit

    #2
    Re: carriage return in a string disappears

    Hi,

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

    Marvin Smit.


    On Tue, 30 Aug 2005 02:38:10 -0700, sys
    <sys@discussion s.microsoft.com > wrote:
    [color=blue]
    >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.
    >Thanks for any help.[/color]

    Comment

    • sys

      #3
      Re: carriage return in a string disappears

      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.


      "Marvin Smit" wrote:
      [color=blue]
      > Hi,
      >
      > - Are you crossing OS boundries?
      > - Which toolkits are used? (Server & Client)
      >
      > Marvin Smit.
      >
      >
      > On Tue, 30 Aug 2005 02:38:10 -0700, sys
      > <sys@discussion s.microsoft.com > wrote:
      >[color=green]
      > >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.
      > >Thanks for any help.[/color]
      >
      >[/color]

      Comment

      Working...