We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22080c5 commit b5e2279Copy full SHA for b5e2279
compiler/src/dotty/tools/dotc/rewrites/Rewrites.scala
@@ -8,6 +8,8 @@ import collection.mutable
8
import scala.annotation.tailrec
9
import dotty.tools.dotc.reporting.Reporter
10
11
+import java.nio.charset.StandardCharsets.UTF_8
12
+
13
/** Handles rewriting of Scala2 files to Dotty */
14
object Rewrites {
15
private class PatchedFiles extends mutable.HashMap[SourceFile, Patches]
@@ -56,7 +58,7 @@ object Rewrites {
56
58
57
59
def writeBack(): Unit = {
60
val chars = apply(source.underlying.content)
- val bytes = new String(chars).getBytes
61
+ val bytes = new String(chars).getBytes(UTF_8)
62
val out = source.file.output
63
out.write(bytes)
64
out.close()
0 commit comments