Fix a crash in when passing in non UTF-8 characters.

1. The language printed by the style checker depend on locale.
   There might be differnt language other than english.
   Use xml ending tag to handle the footer instead of use footer itself.
2. Use system encoding for printed text, if it is ascii, set it to
3. Fix the print out to only have one "ERRORS:" and "WARNINGS:" header.
   (Bug was introduced in

Bug: 122443089
Test: None
Change-Id: I6c985ce656c7a55d35ea66f8b6d727d21544e6ad
1 file changed