title: Reading text file from host system and docker container yields different results
body: <p>I want to read a textfile line by line in an application that is running inside a docker container. The file contains paths to some other files and i want to mess around with these.</p>
  
  <p>Because the file is also read by a vb6 program it is required to be encoded in ISO-8859-1. </p>
  
  <p>When I read the file on my docker host machine (ubuntu 18.04.3) everything works. But when I read it inside my docker container, special characters are not read properly.</p>
  
  <p>This is my Code:</p>
  
  <pre><code>String n = "/foo/bar.txt";
  List&lt;String&gt; lines = Files.readAllLines(Paths.get(n),StandardCharsets.ISO_8859_1);
  for(String line : lines) {
      File[] directories = new File(line).listFiles(File::isDirectory);
  }
  </code></pre>
  
  <p>On my host machine, <code>directories</code> is correctly populated, but inside the docker-container it is <code>null</code>.</p>
  
  <p>I identified the problem being the speciel character <code>ä</code>. When I print out the bytes, on the host machine it is: <code>-61 -92</code> while inside the container it is <code>63</code>.</p>
  
  <p>The container is derived from amazoncoretto:8,</p>
  
  <p>I hope sombody can help.</p>