private static ImmutableList<String> readLinesFromResource(String name) {
try (InputStream in = LdmlConverter.class.getResourceAsStream(name)) {
- return ImmutableList.copyOf(CharStreams.readLines(new InputStreamReader(in)));
+ return ImmutableList.copyOf(CharStreams.readLines(new InputStreamReader(in, UTF_8)));
} catch (IOException e) {
throw new RuntimeException("cannot read resource: " + name, e);
}
}
@SuppressWarnings("unused")
- public void setRoot(Path root) {
- this.root = root;
+ public void setRoot(String root) {
+ // Use String here since on some systems Ant doesn't support automatically converting Path instances.
+ this.root = Paths.get(root);
}
@SuppressWarnings("unused")
import static org.unicode.cldr.api.CldrPath.parseDistinguishingPath;
import java.nio.file.Path;
+import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
private Predicate<String> idFilter = id -> true;
@SuppressWarnings("unused")
- public void setOutputDir(Path path) {
- config.setOutputDir(path);
+ public void setOutputDir(String path) {
+ // Use String here since on some systems Ant doesn't support automatically converting Path instances.
+ config.setOutputDir(Paths.get(path));
}
@SuppressWarnings("unused")
- public void setCldrDir(Path path) {
- this.cldrPath = checkNotNull(path);
+ public void setCldrDir(String path) {
+ // Use String here since on some systems Ant doesn't support automatically converting Path instances.
+ this.cldrPath = checkNotNull(Paths.get(path));
}
@SuppressWarnings("unused")
}
@SuppressWarnings("unused")
- public void setSpecialsDir(Path path) {
- config.setSpecialsDir(path);
+ public void setSpecialsDir(String path) {
+ // Use String here since on some systems Ant doesn't support automatically converting Path instances.
+ config.setSpecialsDir(Paths.get(path));
}
@SuppressWarnings("unused")