Skip to content

Commit

Permalink
#240 Force UTF8 encoding when reading file
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jan 16, 2020
1 parent a79ff4d commit d43ca8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/org/thp/cortex/services/WorkerSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import play.api.{Configuration, Logger}

import scala.collection.JavaConverters._
import scala.concurrent.{ExecutionContext, Future}
import scala.io.Codec
import scala.util.{Failure, Success, Try}

@Singleton
Expand Down Expand Up @@ -155,7 +156,7 @@ class WorkerSrv @Inject()(

def readFile(path: Path, workerType: WorkerType.Type): Seq[WorkerDefinition] = {
val reads = WorkerDefinition.reads(workerType)
val source = scala.io.Source.fromFile(path.toFile)
val source = scala.io.Source.fromFile(path.toFile)(Codec.UTF8)
lazy val basePath = path.getParent.getParent
val workerDefinitions =
for {
Expand Down

0 comments on commit d43ca8c

Please sign in to comment.