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

Ask a Question related to ASP.NET Web Services, Design and Development.

  1. #1

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

    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?
    In-Ho Yi Guest

  2. Similar Questions and Discussions

    1. Form Question - Multi-Line Problem
      I am making a pdf form of an incident report in Acrobat Professional CS3. One of the questions needs a multi-line answer, which is not the...
    2. Passing Multi Dimension Array to CFC from Flash
      Passing a single dimension array works just fine, but is there a way to pass a multi dimension array? Your thoughts/help would be greatly...
    3. Query string and Parameter Passing Problem
      Hi In the context of a Master/Detail scenario, I am having trouble figuring out the correct syntax for passing a parameter in a query string in a...
    4. Multi-line keys in SQL?
      I've been using FM for many years now, and have made extensive use of multi-line keys (multiple values in a text field, separated by returns, for...
    5. Multi-line text
      If I have a text layer with multiple lines, the spacing between them is extreme. Is there any to decrease the spacing in Elements v.2? Thanks,...
  3. #2

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

    This is a side effect of the end-of-line normalization in Xml (see
    [url]http://www.w3.org/TR/REC-xml#sec-line-ends[/url] 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.

    --
    Vitaly.
    -------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Use of included script samples are subject to the terms specified at
    [url]http://www.microsoft.com/info/cpyright.htm[/url].

    "In-Ho Yi" <anonymous@discussions.microsoft.com> wrote in message
    news:041601c3bf71$b0776450$a401280a@phx.gbl...
    > 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?

    Vitaly Filimonov [MSFT] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139