Skip to content

Commit 81b3038

Browse files
michelouallanrenucci
authored andcommitted
Fix exception 'UnmappableCharacterException' in dottydoc on Windows (#5430)
1 parent 6448998 commit 81b3038

File tree

1 file changed

+1
-1
lines changed
  • doc-tool/src/dotty/tools/dottydoc/staticsite

1 file changed

+1
-1
lines changed

doc-tool/src/dotty/tools/dottydoc/staticsite/Site.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ case class Site(
408408
}
409409

410410
private def toSourceFile(f: JFile): SourceFile =
411-
SourceFile(AbstractFile.getFile(new File(f.toPath)), Source.fromFile(f).toArray)
411+
SourceFile(AbstractFile.getFile(new File(f.toPath)), Source.fromFile(f, "UTF-8").toArray)
412412

413413
private def collectFiles(dir: JFile, includes: String => Boolean): Array[JFile] =
414414
dir

0 commit comments

Comments
 (0)