mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-05 21:45:37 +00:00
ICU-21140 Fix cldr-to-icu tooling to work on Windows
This commit is contained in:
parent
f0ad454691
commit
bb7b8481bd
3 changed files with 14 additions and 9 deletions
|
@ -242,7 +242,7 @@ public final class LdmlConverter {
|
|||
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -100,8 +100,9 @@ public final class CleanOutputDirectoryTask extends Task {
|
|||
}
|
||||
|
||||
@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")
|
||||
|
|
|
@ -16,6 +16,7 @@ import static java.util.stream.Collectors.joining;
|
|||
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;
|
||||
|
@ -76,13 +77,15 @@ public final class ConvertIcuDataTask extends Task {
|
|||
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")
|
||||
|
@ -108,8 +111,9 @@ public final class ConvertIcuDataTask extends Task {
|
|||
}
|
||||
|
||||
@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")
|
||||
|
|
Loading…
Add table
Reference in a new issue