#486 Add invalid encoding check

_release_4.3
closed
nobody
5
2013-12-08
2007-06-28
Mike Perham
No

We want all our source to be encoded in UTF-8. There does not seem to be a way to check this with checkstyle. I can set the charset property on TreeWalker but this does not seem to generate an error with checkstyle 4.3. Non-UTF-8 encoded files are passed as clean. I would like TreeWalker to explicitly generate an error if the charset does not match the file's actual encoding.

Discussion

  • This definitely would be useful!

     
  • Just an FYI. If a check like this were created it would be for the upcoming 5.x point release since we would no longer be introducing new features for older releases.

     
  • Roman Ivanov
    Roman Ivanov
    2013-12-08

    • status: open --> closed
     
  • Roman Ivanov
    Roman Ivanov
    2013-12-08

    works fine for 5.6