It has nothing to do with codepages/encoding. Your output isn't plain text. It contains the sequences like [0;1;32m
. These strings (there is a, not shown, [escape] character as well before each of these) are instructions to the terminal to show text bold, italics, in various colors, etc. This results in easier to read output, if your terminal supports it.
There should be an option to tell clang not to try to beautify the output, but use plain text instead. Check the manual. (I don't have one handy, so I can't tell you what the proper command would be.)