Checkstyle parses various XML files using a FileReader.
Since the FileReader uses the platform encoding and not
the encoding from the actual XML file it might distort the
content of the file or make the file even unparsable.
Please read here for more detailed info about this
This means all occurances of FileReader (when parsing
XML) should be extinct and FileInputStream used
This way the parser will honor the actual encoding from
the XML file.
Problematic occurrances are:
To prove that this is not just an theoretical problem I
append the mail I got from a fellow plugin developer:
I am trying the new custom check support functionnality
(as you described it on the web site).
I followed your guide. Everything got fine untill I tried to
actually run the check when building a project: I get an
error telling me: "The 'checkstyle_packages.xml' file is
declared to be UTF-8 whereas it is Cp1252". But the
"checkstyle_packages.xml" I modified is really UTF-8!
Then I changed the encoding of this very file from UTF-8
to Cp1252, and this works now. So I guess that's a little
bug with the parser that should use UTF-8 instead of the
platform dependent encoding (Cp1252 in this very case).
Oh, also: the custom checks I used are i18ned, but the
plugin does not show i18n messages (only the keys).
Maybe there's a little problem with the classloader...
Apart from that, this is cool to be able to add quite easily
custom checks :o)
Hope everything's fine for you!