From: GregNoel Date: Mon, 25 Aug 2008 16:58:08 +0000 (+0000) Subject: Issue 2090: document how to use LANG with Java sources X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a14f2d46fd8fd05c38e3e17bedf29c544f48ff4b;p=scons.git 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 --- 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' +