title: How to fix Unicode character resolution in docker container running gradle?
body: <p>I was trying to run hibernate core java tests inside a container using gradle. I am getting this error during <code>gradlew test</code>.</p>
  
  <pre><code>Task :hibernate-core:compileTestJava FAILED
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Failed to capture fingerprint of input files for task     ':hibernate-core:compileTestJava' property 'source' during up-to-date check.
  &gt; Failed to create MD5 hash for file '/hibernate-orm/hibernate-core/src/test/java/org/    hibernate/internal/util/hib3rnat3/C0nst4nts???.java' as it does not exist.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug     option to get more log output. Run with --scan to get full insights.
  </code></pre>
  
  <p>How do I resolve this?</p>
  
  <p>The actual name of the file is: <code>/hibernate-orm/hibernate-core/src/test/java/org/hibernate/internal/util/hib3rnat3/C0nst4nts३.java</code>
  So the issue I think could be due to filename encoding problem and it is not able to resolve <code>३</code> character and hence the error.</p>
  
  <p>I think I can rule out the possibility of <code>?</code> being used as wildcard character here because <code>md5sum</code> works fine with it. At least bash has no problem with it, gradle might have.</p>
  
  <pre><code>root@9eec67a60ee5:/hibernate-orm/hibernate-core# md5sum /hibernate-orm/hibernate-core/src/test/java/org/hibernate/internal/util/hib3rnat3/C0nst4nts???.java 
  c2474fdef0224623dccd2615049b2bc8  /hibernate-orm/hibernate-core/src/test/java/org/hibernate/internal/util/hib3rnat3/C0nst4nts३.java
  </code></pre>
  
  <p>Another difference between the logs on the host and in container is:</p>
  
  <pre><code>At least one daemon option is different.
  Wanted: DefaultDaemonContext[uid=null,javaHome=/jvm/jdk1.8.0_211,daemonRegistryDir=/root/.gradle/daemon,pid=10183,idleTimeout=null,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=US-ASCII,-Duser.country=US,-Duser.language=en,-Duser.variant]
  Actual: DefaultDaemonContext[uid=4e16e139-fd03-47b2-95b4-92da7853825f,javaHome=/jvm/jdk1.8.0_211,daemonRegistryDir=/root/.gradle/daemon,pid=9578,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=utf-24,-Duser.country=US,-Duser.language=en,-Duser.variant]
  
  Looking for a different daemon...
  </code></pre>
  
  <p>The difference between expected and actual here is the file.encoding.</p>