From 100718a811b3cd5b991cb47217e0c1791dd48f3e Mon Sep 17 00:00:00 2001 From: paltherr Date: Sun, 21 Mar 2004 13:33:38 +0000 Subject: - Added flag -encoding --- sources/scalac/CompilerCommand.java | 6 ++++++ sources/scalac/Global.java | 2 ++ 2 files changed, 8 insertions(+) (limited to 'sources') 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); -- cgit v1.2.3