title: New lines and browser/OS compatability
body: <p>I have a form that accepts a list of values, each value being listed on a separate line of textArea. In my Servlet, I am tokenizing the string I recieve from that textArea based on the new line characters "\r\n", like so:</p>
  
  <pre><code>String[] partNumberList = originalPartNumberString.split("\r\n");
  </code></pre>
  
  <p>This appears to work fine. I get an array of values as expected. I believe this is because the browser handles standardizing the way newlines are sent to the server, regardless of what OS / browser the form data is being sent from (<a href="https://stackoverflow.com/questions/760282/do-line-endings-distinctions-apply-for-html-forms">see this post</a>). I've tested in IE, Firefox, Chrome ... everything appears to work fine with that and I feel pretty confident about it.</p>
  
  <p>After receiving the values on the server side, I then use those values for some looks ups, etc., then I write them back to the textArea for the response. In order to do so, I am writing it back in the same fashion I am receiving it ... I just build a new String, and separate each value with a "\r\n". I then set the value of the textArea to that String.</p>
  
  <pre><code>StringBuffer invalidReturnPartList = new StringBuffer("");
  
  for (int i = 0; i &lt; requestedPartList.length; i++)
  {
      invalidReturnPartList.append(requestedPartList[i]);
      invalidReturnPartList.append("\r\n");
  }
  
  return invalidReturnPartList.toString();
  </code></pre>
  
  <p>This also tests OK for me in all browsers I have tried. However, I'm just nervous about whether I'm covering all my bases here ... if someone is running a Mac, will the "\r\n" translate correctly on their browser? What about Linux? I would think everything would be handled in the browser, but I am just not sure here... so my question is, does this look right to you, or have I missed something?</p>