From a14f2d46fd8fd05c38e3e17bedf29c544f48ff4b Mon Sep 17 00:00:00 2001 From: GregNoel Date: Mon, 25 Aug 2008 16:58:08 +0000 Subject: [PATCH] Issue 2090: document how to use LANG with Java sources git-svn-id: http://scons.tigris.org/svn/scons/trunk@3307 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/engine/SCons/Tool/javac.xml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/engine/SCons/Tool/javac.xml b/src/engine/SCons/Tool/javac.xml index ee936853..e6826350 100644 --- a/src/engine/SCons/Tool/javac.xml +++ b/src/engine/SCons/Tool/javac.xml @@ -61,13 +61,28 @@ will generate a corresponding sub/dir/Foo.class class file. -Example: +Examples: env.Java(target = 'classes', source = 'src') env.Java(target = 'classes', source = ['src1', 'src2']) env.Java(target = 'classes', source = ['File1.java', 'File2.java']) + +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 LANG +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. + + +env = Environment() +env['ENV']['LANG'] = 'en_GB.UTF-8' + -- 2.26.2