You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2019/08/20 18:44:01 UTC
[royale-compiler] branch develop updated: MXMLRoyalePublisher,
GoogDepsWriter: more utf8 charset requirements
This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
The following commit(s) were added to refs/heads/develop by this push:
new 8f68416 MXMLRoyalePublisher, GoogDepsWriter: more utf8 charset requirements
8f68416 is described below
commit 8f6841679815adb7272342eb3c66b7a3d4dfcbd2
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Tue Aug 20 11:43:49 2019 -0700
MXMLRoyalePublisher, GoogDepsWriter: more utf8 charset requirements
---
.../internal/codegen/mxml/royale/MXMLRoyalePublisher.java | 4 ++--
.../apache/royale/compiler/internal/graph/GoogDepsWriter.java | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
index 0159b25..f2ff42c 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
@@ -361,7 +361,7 @@ public class MXMLRoyalePublisher extends JSGoogPublisher implements IJSPublisher
// the application will not be able to run.
for(SourceFile closureSourceFile : closureSourceFiles) {
FileUtils.write(new File(new File(intermediateDir, "library/closure"),
- closureSourceFile.getName()), closureSourceFile.getCode());
+ closureSourceFile.getName()), closureSourceFile.getCode(), Charset.forName("utf8"));
}
closureSourceFiles = closureFilesInOrder(intermediateDir + "/library/closure/", closureSourceFiles, "goog.events.EventTarget");
@@ -649,7 +649,7 @@ public class MXMLRoyalePublisher extends JSGoogPublisher implements IJSPublisher
List<String> fileLines;
try
{
- fileLines = Files.readLines(new File(filePath), Charset.defaultCharset());
+ fileLines = Files.readLines(new File(filePath), Charset.forName("utf8"));
}
catch(IOException e)
{
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java
index cf87fba..5f2817e 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java
@@ -546,7 +546,7 @@ public class GoogDepsWriter {
List<String> fileLines;
try {
File mainFile = new File(main.filePath);
- fileLines = Files.readLines(mainFile, Charset.defaultCharset());
+ fileLines = Files.readLines(mainFile, Charset.forName("utf8"));
SourceMapConsumerV3 sourceMapConsumer = null;
File sourceMapFile = null;
@@ -555,7 +555,7 @@ public class GoogDepsWriter {
sourceMapFile = new File(main.filePath + ".map");
if (sourceMapFile.exists())
{
- String sourceMapContents = FileUtils.readFileToString(sourceMapFile);
+ String sourceMapContents = FileUtils.readFileToString(sourceMapFile, Charset.forName("utf8"));
sourceMapConsumer = new SourceMapConsumerV3();
try
{
@@ -643,7 +643,7 @@ public class GoogDepsWriter {
depMap.put(gd.className, gd);
List<String> fileLines;
try {
- fileLines = Files.readLines(new File(gd.filePath), Charset.defaultCharset());
+ fileLines = Files.readLines(new File(gd.filePath), Charset.forName("utf8"));
FileInfo fi = getFileInfo(fileLines, className);
gd.fileInfo = fi;
} catch (IOException e) {
@@ -694,7 +694,7 @@ public class GoogDepsWriter {
{
gd = depMap.get(className);
File depFile = new File(gd.filePath);
- List<String> fileLines = Files.readLines(depFile, Charset.defaultCharset());
+ List<String> fileLines = Files.readLines(depFile, Charset.forName("utf8"));
ArrayList<String> finalLines = new ArrayList<String>();
SourceMapConsumerV3 sourceMapConsumer = null;
@@ -704,7 +704,7 @@ public class GoogDepsWriter {
sourceMapFile = new File(gd.filePath + ".map");
if (sourceMapFile.exists())
{
- String sourceMapContents = FileUtils.readFileToString(sourceMapFile);
+ String sourceMapContents = FileUtils.readFileToString(sourceMapFile, Charset.forName("utf8"));
sourceMapConsumer = new SourceMapConsumerV3();
try
{