diff --git a/docker/android/assemble-apk.sh b/docker/android/assemble-apk.sh index dfa1f0a..6e11e09 100755 --- a/docker/android/assemble-apk.sh +++ b/docker/android/assemble-apk.sh @@ -140,8 +140,16 @@ if [[ ${#JAVA_FILES[@]} -gt 0 ]]; then # `-Xlint:-options` silences one note, "source value 8 is obsolete", which # is advice about a future JDK rather than about this code. The JDK is # pinned in the Dockerfile, so the day it matters is a deliberate bump. + # + # `-encoding UTF-8` because javac otherwise reads sources in the *platform* + # encoding, and the container sets no locale, so that is US-ASCII. Every + # curly quote and em dash in a comment then becomes "unmappable character + # (0x94)" — 55 errors from prose, in a file whose code is fine. The sources + # are UTF-8 like everything else in the repo; this says so rather than + # asking the prose to be typed in ASCII. javac \ -source 8 -target 8 \ + -encoding UTF-8 \ -bootclasspath "${ANDROID_JAR}" \ -classpath "${ANDROID_JAR}" \ -Xlint:-options \