diff --git a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/test/BaseTextComparisonTest.kt b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/test/BaseTextComparisonTest.kt index 0de187a5cc..f887d88f8b 100644 --- a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/test/BaseTextComparisonTest.kt +++ b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/test/BaseTextComparisonTest.kt @@ -36,7 +36,8 @@ abstract class BaseTextComparisonTest { "Source file $sourceFile is missing" } - val actual = transformTextContent(sourceFile.readText()) // UTF-8 + val sourceText = sourceFile.readText(Charsets.UTF_8).normalize() + val actual = transformTextContent(sourceText) if (!expectedFile.exists()) { expectedFile.writeText(actual)