Commit 32170ad8 authored by eseidel's avatar eseidel Committed by Commit bot

Make javac.py assume UTF-8 encoding always

My understanding is that by-default javac
pulls encoding from the user's environment
http://stackoverflow.com/questions/9661935/how-to-change-the-defaults-system-java-encode-form-in-windows
http://stackoverflow.com/questions/11343828/file-encoding-has-no-effect-lc-all-environment-variable-does-it
which is wrong for Chromium where all of our
source files are known to be UTF-8, regardless
of what the user has set in their environment.

In my case I was using Chrome Remote Desktop
to connect to my linux machine and for
whatever reason LANG was missing from the
resulting environment.  After this patch
mojo_shell builds correctly for Android again.

BUG=419378

Review URL: https://codereview.chromium.org/869673002

Cr-Commit-Position: refs/heads/master@{#313432}
parent c784a6f0
...@@ -72,6 +72,9 @@ def DoJavac( ...@@ -72,6 +72,9 @@ def DoJavac(
javac_args = [ javac_args = [
'-g', '-g',
# Chromium only allows UTF8 source files. Being explicit avoids
# javac pulling a default encoding from the user's environment.
'-encoding', 'UTF-8',
'-source', '1.7', '-source', '1.7',
'-target', '1.7', '-target', '1.7',
'-classpath', ':'.join(classpath), '-classpath', ':'.join(classpath),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment