From 5e7a97bda2ba7f206c231a28276a237b030da386 Mon Sep 17 00:00:00 2001 From: Greg Noel Date: Mon, 25 Aug 2008 16:58:08 +0000 Subject: Issue 2090: document how to use LANG with Java sources --- 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 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 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' + -- cgit v0.12