diff --git a/WHATSNEW b/WHATSNEW index 63c03b837..da9f06c8c 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -385,6 +385,9 @@ Fixed bugs: the setbeans attribute. Bugzilla Report 47336. + * ' encoding attribute didn't work. + Bugzilla Report 47382. + Other changes: -------------- * A HostInfo task was added performing information on hosts, including info on diff --git a/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java b/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java index dfd98b45a..0fbaf0fee 100644 --- a/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java +++ b/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java @@ -168,11 +168,7 @@ public class LoadProperties extends Task { if (!text.endsWith("\n")) { text = text + "\n"; } - if (encoding == null) { - tis = new ByteArrayInputStream(text.getBytes()); - } else { - tis = new ByteArrayInputStream(text.getBytes(encoding)); - } + tis = new ByteArrayInputStream(text.getBytes()); final Properties props = new Properties(); props.load(tis); diff --git a/src/tests/antunit/taskdefs/loadproperties-test.xml b/src/tests/antunit/taskdefs/loadproperties-test.xml index b8421f1b0..1ebd5c27e 100644 --- a/src/tests/antunit/taskdefs/loadproperties-test.xml +++ b/src/tests/antunit/taskdefs/loadproperties-test.xml @@ -58,4 +58,14 @@ xref-complex.f=$${xref-complex.e} + + + +a=Hello world in EBCDIC + + + + +