diff --git a/README.md b/README.md index d0041a6..f11bc85 100644 --- a/README.md +++ b/README.md @@ -59,13 +59,15 @@ target: [cap] CAP saved to /Users/martin/projects/ant-javacard/Empty_A000000617008E5CDAAE_50da91a4_2.2.2.cap ``` ## Recommended setup -- Targeting JC 3.0.4 or later +- Targeting JC 3.0.4 or later (modern JavaCard-s) - Use JDK 17 (don't forget to set `$JAVA_HOME`) - Use JavaCard SDK 3.2.0 (`jckit="sdks/jc320v24.0_kit"`) with right target (`targetsdk="3.x.y"`) -- Targeting JC 2.x.y or 3.0.1 +- Targeting JC 2.x.y or 3.0.1 (legacy JavaCard-s) - Use JDK 8 (don't forget to set `$JAVA_HOME`) - Use JavaCard SDK 3.0.5u4 (`jckit="sdks/jc305u4_kit"`) with right target (`targetsdk="sdks/jc222_kit"`) +> Note: ant-javacard will continue to support JavaCard 2 for as long as this is achievable with sane effort. + ## Syntax Sample: @@ -109,6 +111,7 @@ Details: Notes: * `jc.home` property has the highest precedence, followed by `jckit` path of `cap`, followed by path in `javacard`, followed by `JC_HOME` environment variable. SDK must be valid to be considered for use. + * All source files are expected to be UTF-8. It is a sane choice, please use it. ### Output file name variables * `%h` - 8 character prefix of the SHA-256 Load File Data Block hash of the CAP file diff --git a/task/src/main/java/pro/javacard/ant/JCCap.java b/task/src/main/java/pro/javacard/ant/JCCap.java index ce321cb..0ed3f14 100644 --- a/task/src/main/java/pro/javacard/ant/JCCap.java +++ b/task/src/main/java/pro/javacard/ant/JCCap.java @@ -364,6 +364,8 @@ private void compile() { // construct javac task Javac j = new Javac(); j.setProject(project); + // See https://github.com/martinpaljak/ant-javacard/pull/96 + j.setEncoding("utf-8"); j.setTaskName("compile"); org.apache.tools.ant.types.Path sources = mkPath(null);