I'm translating a Java application by using a ResourceBundle
with various *.properties
files. Now I like to have a Gradle task or want to modify a task to automatically escape any unicode character by replacing it with its ASCII representation, something like Java's native2ascii
tool does.
This is what I'm done so far with my build file, but the output remains unescaped:
import org.apache.tools.ant.filters.EscapeUnicode
tasks.withType(ProcessResources) {
filesMatching('**/*.properties') {
println "\t-> ${it}"
filter EscapeUnicode
}
}
Any help is appreciated.