Delphi comes localized in various languages (English, Japanese, German, French I think). The command line compiler (dcc32) also has been localized so the German version writes "Fehler" rather than "Error" and "Warnung" rather than "Warning" to the console.
I have written a program that parses this output and (as one of its features) counts Errors and Warnings. This fails with the localized strings.
I could adapt the program to also detect the localized text but that feels wrong. I'd rather force the compiler to use English for its output. Is there a command line switch or any other option to do that?
I'd like to support all Delphi versions that use msbuild, that is >=2007.
EDIT:
As for reading the error code rather than the message, consider the following error:
C:\[...]\Borland.Delphi.Targets(113,3): error : blub.pas(56) Error: E2029 ',' expected but identifier 'bla' found
The error code is E2029 but it is rather difficult for a program to detect it. Detecting the text "Error: " is much simpler and less error prone.