Be that as it may, an output with an undeterministic character encoding isn't really what you want even when debugging.
Frankly, it seems to me that werror() ought to encode the message using the environment character encoding, and escape any unencodable character as \uxxxx or suchlike. But until that happens, may I suggest printing with %q instead?