From a83da3a4525bf855c6c68c34dfbc8d93941d6174 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 14 May 2020 08:54:15 -0400 Subject: DRTVWR-476: Make LLSDFormatter::OPTIONS_PRETTY_BINARY uppercase for compatibility with Python llbase.llsd.parse(). The Python parse() currently requires uppercase hex digits for b16"hex" coding; lowercase hex digits cause it to raise LLSDParseError. --- indra/llcommon/llsdserialize.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra') diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index 598bec0558..022a5d4659 100644 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -1423,6 +1423,10 @@ S32 LLSDNotationFormatter::format_impl(const LLSD& data, std::ostream& ostr, { std::ios_base::fmtflags old_flags = ostr.flags(); ostr.setf( std::ios::hex, std::ios::basefield ); + // It shouldn't strictly matter whether the emitted hex digits + // are uppercase; LLSDNotationParser handles either; but as of + // 2020-05-13, Python's llbase.llsd requires uppercase hex. + ostr << std::uppercase; auto oldfill(ostr.fill('0')); auto oldwidth(ostr.width()); for (int i = 0; i < buffer.size(); i++) -- cgit v1.2.3