diff options
author | paltherr <paltherr@epfl.ch> | 2004-03-21 13:33:38 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-03-21 13:33:38 +0000 |
commit | 100718a811b3cd5b991cb47217e0c1791dd48f3e (patch) | |
tree | 0bcf4b9975938d6c019a197a24ba4ed173b7a0e8 | |
parent | 49332fe728c05d76cb140da690df002ba213ddd5 (diff) | |
download | scala-100718a811b3cd5b991cb47217e0c1791dd48f3e.tar.gz scala-100718a811b3cd5b991cb47217e0c1791dd48f3e.tar.bz2 scala-100718a811b3cd5b991cb47217e0c1791dd48f3e.zip |
- Added flag -encoding
-rw-r--r-- | sources/scalac/CompilerCommand.java | 6 | ||||
-rw-r--r-- | sources/scalac/Global.java | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sources/scalac/CompilerCommand.java b/sources/scalac/CompilerCommand.java index 12472e5d5b..548ee5d29a 100644 --- a/sources/scalac/CompilerCommand.java +++ b/sources/scalac/CompilerCommand.java @@ -55,6 +55,7 @@ public class CompilerCommand extends CommandParser { public final StringOptionParser bootclasspath; public final StringOptionParser extdirs; public final StringOptionParser outpath; + public final StringOptionParser encoding; public final StringOptionParser assemrefs; public final ChoiceOptionParser target; public final BooleanOptionParser noimports; @@ -161,6 +162,11 @@ public class CompilerCommand extends CommandParser { "d", "Specify where to place generated class files", "directory", "."), + this.encoding = new StringOptionParser(this, + "encoding", "Specify character encoding used by source files", + // !!! is there a way to get the platform default charset name + "encoding", "ISO-8859-1"), + this.assemrefs = new StringOptionParser(this, "r", "Assemblies referenced by the source program", "assembly files", "."), diff --git a/sources/scalac/Global.java b/sources/scalac/Global.java index 718c5c919b..ece6ae14b5 100644 --- a/sources/scalac/Global.java +++ b/sources/scalac/Global.java @@ -59,6 +59,7 @@ public abstract class Global { public final boolean printtokens; public final String outpath; + public final String encoding; public final String target; /** the message reporter @@ -193,6 +194,7 @@ public abstract class Global { this.printtokens = args.print.tokens; this.classPath = args.classpath(); this.outpath = args.outpath(); + this.encoding = args.encoding.value; this.target = interpret ? TARGET_INT : args.target.value.intern(); this.separate = args.separate.value.equals("yes") || args.separate.value.equals("default") && !this.target.equals(TARGET_INT); |