title: Unwanted new line string / fputcsv
body: <p>So I am trying to use fputcsv, and it works, almost like it is intented. I have this weird problem, that I can not seem to solve, and I do not find any good documentation or even people who have this problem.</p>
  
  <p>When there is a string that is being put in the csv, it goes well most of the time, but sometime it starts a new line in the middle of the string for no reason, when I go into the MySQL DB it does not show any stuff like <code>\n</code>, of even a weird character. </p>
  
  <p>It just starts a new line for no reason, what I see sometimes is that there is a "long" word written like this: "today is saturday.tomorrow is sunday" and then it starts a new line after tomorrow, there is no space between the period and next word, but this does not seem a good reason to start a new line? </p>
  
  <p>When I print out the array, it also has the same line ending at that spot... Anyone have any idea what it could be?</p>
  
  <p>My apologies if this does not make any sense...</p>
  
  <p>EDIT: added code and examples</p>
  
  <pre><code>public function actionExportCSV()
  {
      $model = Vicreg::model()-&gt;findAllByAttributes(array('event_id' =&gt; $_GET['eventid']));
      if($model){
          $output = fopen("php://output",'w') or die("Can't open php://output");
          header("Content-Type:application/csv"); 
          header("Content-Disposition:attachment;filename=verzorgingen.csv"); 
          fputcsv($output, array('id','event_id','name','firstname','dob','sex','urgency','pathology','pathology_other','treatment','treatment_other','medication','medication_other','material_other','material','docs','hour_in','hour_out','station_id','nurses_id','transport_id','hospital_id','ambulance_id','closed'));
          foreach($model as $vicreg) {
              $array = array();
              //if($vicreg-&gt;id == "83") { print_r($vicreg); exit(0); }
              foreach($vicreg-&gt;attributes as $key =&gt; $attribute) {
                  $attribute = str_replace('  ', '', $attribute);
                  $array[$key] = trim(stripslashes($attribute));
              }
              fputcsv($output, $array, ',' ,'"');
          }
  
          fclose($output) or die("Can't close php://output");
      } else {
          throw new CHttpException(422, 'Geen evenement opgegeven');
      }
  }
  </code></pre>
  
  <p>Example</p>
  
  <blockquote>
    <p>83,4,Name,Firstname,1970-01-01,1,3,4,"normal string",1,"dagelijks 2X te verzorgen. brandwonden 3 dagen geleden opgelopen door knalpot van brommer.<br>
    voornamelijk 2de graads brandwonden + open wonde",,,,,,"date","date",5,,1,,,1</p>
  </blockquote>
  
  <p>After "brommer." there is a new line...             </p>