diff --git a/chapi-application/src/main/kotlin/chapi/app/analyser/support/BaseAnalyser.kt b/chapi-application/src/main/kotlin/chapi/app/analyser/support/BaseAnalyser.kt index 047bd4f7..590b52da 100644 --- a/chapi-application/src/main/kotlin/chapi/app/analyser/support/BaseAnalyser.kt +++ b/chapi-application/src/main/kotlin/chapi/app/analyser/support/BaseAnalyser.kt @@ -16,7 +16,13 @@ abstract class BaseAnalyser(private var config: ChapiConfig) : IAnalyser { fun readFileAsString(filepath: String): String { val bufferedReader: BufferedReader = File(filepath).bufferedReader() - return bufferedReader.use { it.readText() } + var text = bufferedReader.use { it.readText() } + + // fix for Window issue + if (text.startsWith("\uFEFF")) { + text = text.substring(1); + } + return text } abstract fun analysisByFiles(files: Array): Array