Skip to content

Commit

Permalink
Making sure, that we explicitly specify the codec of the parsed features
Browse files Browse the repository at this point in the history
  • Loading branch information
SaschaPeukert committed Aug 22, 2018
1 parent e3e0d1b commit c572e3d
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -44,7 +44,7 @@ import org.opencypher.tools.tck.constants.{TCKErrorDetails, TCKErrorPhases, TCKE
import org.opencypher.tools.tck.values.CypherValue

import scala.collection.JavaConverters._
import scala.io.Source
import scala.io.{Codec, Source}
import scala.util.{Failure, Success, Try}

object CypherTCK {
Expand Down Expand Up @@ -89,11 +89,11 @@ object CypherTCK {
}

def parseFilesystemFeature(file: File): Feature = {
parseFeature(file.getAbsolutePath, Source.fromFile(file).mkString)
parseFeature(file.getAbsolutePath, Source.fromFile(file)(Codec.UTF8).mkString)
}

def parseClasspathFeature(pathUrl: URL): Feature = {
parseFeature(pathUrl.toString, Source.fromURL(pathUrl).mkString)
parseFeature(pathUrl.toString, Source.fromURL(pathUrl)(Codec.UTF8).mkString)
}

def parseFeature(source: String, featureString: String): Feature = {
Expand Down

0 comments on commit c572e3d

Please sign in to comment.