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/12/17 22:38:52 UTC
[royale-compiler] branch develop updated: GoogDepsWriter: fixed
issue where remove-circulars caused utf8 encoding to be lost
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 e2d4d98 GoogDepsWriter: fixed issue where remove-circulars caused utf8 encoding to be lost
e2d4d98 is described below
commit e2d4d98cfbdb6252f219914d9b20a896ea5ab640
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Tue Dec 17 14:38:42 2019 -0800
GoogDepsWriter: fixed issue where remove-circulars caused utf8 encoding to be lost
---
.../org/apache/royale/compiler/internal/graph/GoogDepsWriter.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
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 6b4081d..82ca452 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
@@ -610,7 +610,7 @@ public class GoogDepsWriter {
sourceMapConsumer = addLineToSourceMap(sourceMapConsumer, mainFile.getName(), main.fileInfo.googProvideLine + 1);
}
- PrintWriter out = new PrintWriter(new FileWriter(mainFile));
+ PrintWriter out = new PrintWriter(new FileWriter(mainFile, Charset.forName("utf8")));
for (String s : fileLines)
{
out.println(s);
@@ -620,7 +620,7 @@ public class GoogDepsWriter {
if (sourceMapConsumer != null)
{
String newSourceMap = sourceMapConsumerToString(sourceMapConsumer, mainFile.getName());
- PrintWriter sourceMapOut = new PrintWriter(new FileWriter(sourceMapFile));
+ PrintWriter sourceMapOut = new PrintWriter(new FileWriter(sourceMapFile, Charset.forName("utf8")));
sourceMapOut.print(newSourceMap);
sourceMapOut.close();
}
@@ -882,7 +882,7 @@ public class GoogDepsWriter {
finalLines.add(gd.fileInfo.googProvideLine + 1, sb.toString());
sourceMapConsumer = addLineToSourceMap(sourceMapConsumer, depFile.getName(), gd.fileInfo.googProvideLine + 1);
- PrintWriter out = new PrintWriter(new FileWriter(depFile));
+ PrintWriter out = new PrintWriter(new FileWriter(depFile, Charset.forName("utf8")));
for (String s : finalLines)
{
out.println(s);
@@ -892,7 +892,7 @@ public class GoogDepsWriter {
if (sourceMapConsumer != null)
{
String newSourceMap = sourceMapConsumerToString(sourceMapConsumer, depFile.getName());
- PrintWriter sourceMapOut = new PrintWriter(new FileWriter(sourceMapFile));
+ PrintWriter sourceMapOut = new PrintWriter(new FileWriter(sourceMapFile, Charset.forName("utf8")));
sourceMapOut.print(newSourceMap);
sourceMapOut.close();
}