summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/javac.xml
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2008-08-25 16:58:08 (GMT)
committerGreg Noel <GregNoel@tigris.org>2008-08-25 16:58:08 (GMT)
commit5e7a97bda2ba7f206c231a28276a237b030da386 (patch)
treee9f26ab654ba93387c97da727066fc68315e1c5e /src/engine/SCons/Tool/javac.xml
parenteb705ea31fd0a082f97b3ee7fd07f04271ea2641 (diff)
downloadSCons-5e7a97bda2ba7f206c231a28276a237b030da386.zip
SCons-5e7a97bda2ba7f206c231a28276a237b030da386.tar.gz
SCons-5e7a97bda2ba7f206c231a28276a237b030da386.tar.bz2
Issue 2090: document how to use LANG with Java sources
Diffstat (limited to 'src/engine/SCons/Tool/javac.xml')
-rw-r--r--src/engine/SCons/Tool/javac.xml17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/engine/SCons/Tool/javac.xml b/src/engine/SCons/Tool/javac.xml
index ee93685..e682635 100644
--- a/src/engine/SCons/Tool/javac.xml
+++ b/src/engine/SCons/Tool/javac.xml
@@ -61,13 +61,28 @@ will generate a corresponding
<filename>sub/dir/Foo.class</filename>
class file.
-Example:
+Examples:
<example>
env.Java(target = 'classes', source = 'src')
env.Java(target = 'classes', source = ['src1', 'src2'])
env.Java(target = 'classes', source = ['File1.java', 'File2.java'])
</example>
+
+Java source files can use the native encoding for the underlying OS.
+Since SCons compiles in simple ASCII mode by default,
+the compiler will generate warnings about unmappable characters,
+which may lead to errors as the file is processed further.
+In this case, the user must specify the <literal>LANG</literal>
+environment variable to tell the compiler what encoding is uesd.
+For portibility, it's best if the encoding is hard-coded
+so that the compile will work if it is done on a system
+with a different encoding.
+
+<example>
+env = Environment()
+env['ENV']['LANG'] = 'en_GB.UTF-8'
+</example>
</summary>
</builder>