From 61adec92598d412fa2ee7b38f3172408eaeddbf9 Mon Sep 17 00:00:00 2001 From: Balazs Racz Date: Sun, 5 Jun 2022 15:01:44 +0200 Subject: [PATCH] Specifies the XML encoding to be utf-8. --- src/openlcb/ConfigRenderer.cxxtest | 4 ++-- src/openlcb/ConfigRenderer.hxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openlcb/ConfigRenderer.cxxtest b/src/openlcb/ConfigRenderer.cxxtest index 07f9662c7..2d3125bca 100644 --- a/src/openlcb/ConfigRenderer.cxxtest +++ b/src/openlcb/ConfigRenderer.cxxtest @@ -274,7 +274,7 @@ TEST(CdiRender, Render) string s; TestCdi1 cfg(0); cfg.config_renderer().render_cdi(&s); - const char kExpectedTestNodeCdi[] = "" R"data( + const char kExpectedTestNodeCdi[] = "" R"data( testseg @@ -316,7 +316,7 @@ TEST(CdiRender, RenderIdent) string s; TestCdi2 cfg(0); cfg.config_renderer().render_cdi(&s); - const char kExpectedTestNodeCdi[] = "" R"data( + const char kExpectedTestNodeCdi[] = "" R"data( Manuf diff --git a/src/openlcb/ConfigRenderer.hxx b/src/openlcb/ConfigRenderer.hxx index 2a72d7140..34f5ce0aa 100644 --- a/src/openlcb/ConfigRenderer.hxx +++ b/src/openlcb/ConfigRenderer.hxx @@ -387,7 +387,7 @@ public: *s += "<"; if (opts.is_cdi()) { - *s += "?xml version=\"1.0\"?>\n<"; + *s += "?xml version=\"1.0\" encoding=\"utf-8\"?>\n<"; tag = "cdi"; *s += tag; *s += " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "