Checkstyle plugin how to set codepage

Im running checktyle 6.19 in gradle 3.0

I have some Java code with variables containing danish characters like: ‘Æ’ or ‘ø’.
The result is that checkstyle fails.

Caused by: C:\GeneratedCode\generated-sources\dk\xact\test\record1\ Unexpected character 0x2020 in identifier
at antlr.TokenStreamHiddenTokenFilter.consume(
at antlr.TokenStreamHiddenTokenFilter.nextToken(
at antlr.TokenBuffer.fill(

Is there a way to set file codepage/encoding for the checkstyle task?

I found it. I added a property “charset” to my checkstyle config xml file.

<module name="Checker">
    <property name="charset" value="UTF-8"/>