diff --git a/Source/cmXMLSafe.cxx b/Source/cmXMLSafe.cxx index 5cf93ca78..717743b8b 100644 --- a/Source/cmXMLSafe.cxx +++ b/Source/cmXMLSafe.cxx @@ -82,7 +82,7 @@ cmsys_ios::ostream& operator<<(cmsys_ios::ostream& os, cmXMLSafe const& self) // encoding. Instead of escaping these bytes, we should // handle the current locale and its encoding. char buf[16]; - sprintf(buf, "&#x%hx;", static_cast(c)); + sprintf(buf, "[bad-char-%hx]", static_cast(c)); os << buf; } break;