title: Getting "java.nio.charset.UnmappableCharacterException: Input length = 1"
body: <p>I am getting UnmappableCharacterException on the collect() method call (or on the toList() call):</p>
  
  <pre><code>    private static void handleTransaction(Path a_filePath, String a_sTrasactionName, String a_sTransactionFilePath) {
  
      // read file into stream, try-with-resources
      try (Stream&lt;String&gt; stream = Files.lines(Paths.get(a_filePath.toString()), Charset.defaultCharset())) {
  
          List&lt;String&gt; list =
              stream.filter(line -&gt; (line.indexOf(a_sTrasactionName) &gt; 0))
              .collect(Collectors.toList());
  
          list.forEach(line -&gt; {
  
              System.out.println(line);
  
              try (BufferedWriter writer = Files.newBufferedWriter(Paths.get(_FILES_PATH + a_sTransactionFilePath),Charset.defaultCharset(), StandardOpenOption.APPEND)) {
                  writer.write(line + "\n");
              } catch (IOException e) {
                  e.printStackTrace();
              }
          });
      } catch (IOException e1) {
  
          e1.printStackTrace();
      }
  </code></pre>
  
  <p>It worked for me once, but never since then.</p>
  
  <p>The files I read are csv files which were created on solaris. I run the jar on Windows 2012 server</p>
  
  <p>Can you advise please?</p>
  
  <p>Thank you.</p>