Adam Murdoch wrote > I think we should simply have all Gradle scripts use utf-8 encoding, > rather than make this configurable.
Indeed it is one of the ways to avoid problems with encoding of Gradle scripts, but there remains the problem that current Gradle system doesn't always read Gradle scripts using UTF-8 encoding. (Current Gradle system read Gradle scripts using default file encoding.) Supposing Gradle system supports only Gradle scripts with UTF-8 encoding, I propose changing the statement `IOUtils.toString(inputStream)` on UriResource#getText method <https://github.com/nobuoka/gradle/blob/2d826b213293995f60ca80891094ca201acd8cf7/subprojects/core/src/main/groovy/org/gradle/api/internal/resource/UriResource.java#L60> into `IOUtils.toString(inputStream, "UTF-8")`. (I am troubled by this problem when using Gradle on Windows (because its default file encoding is not UTF-8). I know that there is a workaround (setting `-Dfile.encoding=UTF-8` in the `GRADLE_OPTS` env var), but its side effect is not wanted.) -- View this message in context: http://gradle.1045684.n5.nabble.com/Proposal-way-to-set-an-encoding-of-a-Gradle-build-script-tp5712199p5712205.html Sent from the gradle-dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email