Re: String processing bug in .net 2?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



greg.merideth@xxxxxxxxx <greg.merideth@xxxxxxxxx> wrote:
> There's an automated email an application generates, that we've found a
> wierd processing bug(?) with in .net 2.0
>
> The app has the following lines. There are 20 lines above that use
> "\n\r" that wrap just fine:
>
> [20] message.Body += "EONE\n\r";
> [21] message.Body += "Name [{0}] Reg# [{1}] Owner [{2}]\n\r";
> [22] message.Body += "Association [{1}] ADOwner [{4}] \n\r";
>
> and then mails the message. The wierd part is line 20 processes the
> "\n\r" and wraps the line however, the "\n\r" are ignored on lines 21
> and 22. The line comes out in a single continuous line. The [(0)]'s
> need to be in there for an application to process the message. If I
> remove the [(0)]'s the line wraps! Putting them back in the lines does
> not wrap.
>
> What would c# be doing with the "[(0)]" as it shouldn't try to process
> them. With the [(0)] it doesn't process the "\n\r" and without the
> [(0)] it works fine. Wierd eh?

Well for a start, using "\n\r" is very odd - you should be using
"\r\n". However, if you don't believe that to be the issue, could you
post a short but complete program which demonstrates the problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.



Relevant Pages

  • Re: Thunderbird Showstopper? (Was: Re: =?iso-8859-1?Q?Tastaturbelegun?= =?iso-8859-1
    ... die Entwickler gravierende Fehler (Showstopper) wiederholt ignorieren. ... Ich benutze seit einiger Zeit TB (bin mit meinen kompletten Eudora Mails ... | From: Andreas Borutta ... | Ich konnte den Bug hier auch reproduzieren. ...
    (de.comp.sys.mac.misc)
  • Re: OpenSSH Vulns (new?) Priv seperation
    ... It's the ISS disclosure of the bug. ... I've read a few more mails about the ... Basically, enabling privsep in the config limits the danger of the bug, ...
    (Vuln-Dev)
  • Re: Queue wird nicht abgearbeitet
    ... Naja als "nur" ein Bug würde ich das nicht bezeichnen ... ... Zudem nutzen wir die neue 2003 Version ... >Fakt ist jedoch, das Exchange manchmal Message-ID's ... >>Mails laufen dort auf, werden aber nicht weitergeleitet ...
    (microsoft.public.de.german.exchange2000.general)
  • Re: Gmail account and this mailinglist
    ... >> To all who follow this list by getting the mails through a Gmail account ... Who said this is a bug? ... Thanks for pointing out where to file bugs, ...
    (Fedora)
  • Re: View mails in Word
    ... I believe you mean outlook express, in which case you need to post to an OE ... OL is a completely different app ... How can I save mails in a format that can be opened by Word. ...
    (microsoft.public.outlook.general)