From 942a2c3f689b46107538d49a67dbf74c76e672b8 Mon Sep 17 00:00:00 2001 From: m-holger Date: Wed, 4 Jan 2023 11:17:01 +0000 Subject: Add new function QUtil::hex_encode_char --- libqpdf/QPDF_Name.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libqpdf/QPDF_Name.cc') diff --git a/libqpdf/QPDF_Name.cc b/libqpdf/QPDF_Name.cc index 353cf311..1587bcf4 100644 --- a/libqpdf/QPDF_Name.cc +++ b/libqpdf/QPDF_Name.cc @@ -38,7 +38,7 @@ QPDF_Name::normalizeName(std::string const& name) // invalid #. result += "#"; } else if (strchr("#()<>[]{}/%", ch) || (ch < 33) || (ch > 126)) { - result += "#" + QUtil::hex_encode(std::string(&ch, 1)); + result += QUtil::hex_encode_char(ch); } else { result += ch; } -- cgit v1.2.3-54-g00ecf