title: Parsing a CSV with ä, ö, ü
body: <p>I have a problem with reading ö,ü, and ä from a csv.The programm should read a csv-file with the OpenCSV library, then parse it to a list of customers (each row is one customer) and finally write it to another .csv-file adding additional data.</p>
  
  <pre><code>public CSVConverter(String fileNameIn, String fileNameOut, int header){
      try {
          this.fileNameIn = fileNameIn;
          this.fileNameOut = fileNameOut;
          this.header = header;
          reader=new CSVReader(new InputStreamReader(new FileInputStream(this.fileNameIn), "UTF-8"), ';');
          writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(this.fileNameOut), "UTF-8"));
      } catch (FileNotFoundException ex) {
          System.out.println("File not found!");
      } catch (UnsupportedEncodingException ex) {
          Logger.getLogger(CSVConverter.class.getName()).log(Level.SEVERE, null, ex);
      }
  }
  
  
  public void readTXT(){
      try {
          kundenListe = (ArrayList&lt;String[]&gt;) reader.readAll();
      } catch (IOException ex) {
          Logger.getLogger(CSVConverter.class.getName()).log(Level.SEVERE, null, ex);
      }
  
  }
  
  public void writeCSV(){
      this.parseCustomerList();
      for(Kunde customer : this.customerList){
          try {
              writer.write(customer.toString());
              System.out.println(customer.toString());
          } catch (IOException ex) {
              Logger.getLogger(CSVConverter.class.getName()).log(Level.SEVERE, null, ex);
          }
  
      }
  }
  
  private Kunde parseCustomer(String[] row){
      Kunde tempCust = new Kunde();
          tempCust.setKDNR(row[0].trim());
          tempCust.setName_1(row[1].trim());
          tempCust.setName_2(row[2].trim());
          //...
  
          return tempCust;
  }
  private void parseCustomerList(){
      for(String[] kunde : this.kundenListe){
              this.customerList.add(this.parseCustomer(kunde));
      }
  }
  </code></pre>
  
  <p>When I'm trying to write a line from the file via <code>System.out.println(customer.toString());</code> it's also not printed, just a rectangle. But a normal <code>System.out.println("öäü");</code> works fine.</p>
  
  <p>Thank you very much in advance!</p>