
22 Jan
2019
22 Jan
'19
10:35 p.m.
Hello, I've got some characters that are not formatting to hex properly. They are not being interpreted correctly by the strongly typed Format. For instance, consider the format string: const char x = '$'; // also, '_', for instance const auto s = (boost::format("\\x%1$02x") % x).str(); I would expect this to encode to: "\\x24", however, instead this encodes to "\\x0$". I would expect '_' to encode: "\\x5f", however, this encodes to "\\x0_". In a few words, the encoding is "seeing" the char as a literal char instead of as an "integer". Although I could possibly trap for this as being the case, I do not think that I should. Thoughts? Format authors? Best regards, Michael Powell