In File's some convenient methods like File#eachLine(), File#splitEachLine() and others, there is no way to specify the encoding for reading.
For example, there is no 'File#eachLine(String charSet, Closure c)' method.
Of cource, we can write:
but this is not so groovy.
My proposal is, to add encoding() method to java.io.File as a GDK enhancement method, which can be used like:
As reference, if write it by EMC, the definition of method encoding is like:
GDK of java.io.InputStreamReader has equivalents each* methods, this is enough.