Subject: bug#28242: Batch mode compiling: Error messages are displayed with "invalid character" glyph bounding symbols.

From: Eli Zaretskii <[email-masked]>
Date: Sat, 26 Aug 2017 21:12:04 +0300

> Date: Sat, 26 Aug 2017 17:06:59 +0000
> Cc: [email-masked]
> From: Alan Mackenzie <[email-masked]>
> 
> Perhaps the problem is that that function (or some equivalent) isn't
> being called, and Emacs is outputting non-displayable characters
> regardless.

No, I think the problem is in the function using_utf8, called from
'main'.  Does it return true in your case?  If so, what does
terminal-coding-system return in your case in the -batch invocation,
and what is the value of locale-coding-system in that case?