-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ | |
import java.io.IOException; | ||
import java.io.InputStreamReader; | ||
import java.net.URL; | ||
import java.nio.charset.StandardCharsets; | ||
import java.util.Enumeration; | ||
import java.util.LinkedHashSet; | ||
import java.util.Set; | ||
|
@@ -44,7 +45,7 @@ public static Set<String> getRegisteredExtensions(ClassLoader loader) { | |
globalServices = loader.getResources("META-INF/services/org.codehaus.groovy.source.Extensions"); | ||
} | ||
for (URL service : DefaultGroovyMethods.toSet(globalServices)) { | ||
try (BufferedReader svcIn = new BufferedReader(new InputStreamReader(URLStreams.openUncachedStream(service)))) { | ||
try (BufferedReader svcIn = new BufferedReader(new InputStreamReader(URLStreams.openUncachedStream(service), StandardCharsets.UTF_8))) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
daniellansun
Author
Contributor
|
||
String extension = svcIn.readLine(); | ||
while (extension != null) { | ||
extension = extension.trim(); | ||
|
3 comments
on commit aa7cb8e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
groovy/src/main/java/org/codehaus/groovy/transform/ASTTransformationVisitor.java
Line 283 in 2118aef
try (BufferedReader svcIn = new BufferedReader(new InputStreamReader(URLStreams.openUncachedStream(service), StandardCharsets.UTF_8))) { |
This is existing code, which is using UTF-8 to read services
files, so I suppose services
files are UTF-8 because I can not find any spec for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
groovy/src/main/java/org/codehaus/groovy/transform/ASTTransformationVisitor.java
Line 283 in 2118aef
try (BufferedReader svcIn = new BufferedReader(new InputStreamReader(URLStreams.openUncachedStream(service), StandardCharsets.UTF_8))) { This is existing code, which is using UTF-8 to read
services
files, so I supposeservices
files are UTF-8 because I can not find any spec for now.
That is our file, we define everything for it. If it says nowhere that this is UTF-8, then we should define that and it is good. And actually we are not really documenting this very well I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
groovy/src/main/java/org/codehaus/groovy/transform/ASTTransformationVisitor.java
Line 283 in 2118aef
try (BufferedReader svcIn = new BufferedReader(new InputStreamReader(URLStreams.openUncachedStream(service), StandardCharsets.UTF_8))) { This is existing code, which is using UTF-8 to read
services
files, so I supposeservices
files are UTF-8 because I can not find any spec for now.That is our file, we define everything for it. If it says nowhere that this is UTF-8, then we should define that and it is good. And actually we are not really documenting this very well I think
Understood ;-)
Is there a standard somewhere that specifies the encoding of these service resources? For example,
.properties
files are ISO-8859-1 by default.