Closed jarek556 closed 1 year ago
Which branch were you using to get this result? Latest branch should present:
So you'd like to change it to
W dniu 15.10.2019, wto o godzinie 08∶19 -0700, użytkownik Aaron Conole napisał:
Which branch were you using to get this result? Latest branch should present:
It is possible that the value: Identifier-'3132333435'H -- "12345" -- was from some older release. Anyway latest version is still far from perfect: beside the tag name,presented HEX value is invalid because every byte less than 0x10 is presented as one hex digit, so the hex string of 010203 will be presented as 123. best regardsJaroslaw Tabor
[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/esnacc/esnacc-ng/issues/50?email_source =notifications\u0026email_token=ADGYJGDJTOD37WUBFZ2GXWLQOXNR5A5CNFSM4 I6CAKP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB JFGAI#issuecomment-542266113", "url": "https://github.com/esnacc/esnacc-ng/issues/50?email_source=no tifications\u0026email_token=ADGYJGDJTOD37WUBFZ2GXWLQOXNR5A5CNFSM4I6C AKP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBJFG AI#issuecomment-542266113", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
Agreed, I'll submit a fix for that. Will the latest version (with the aforementioned fix) suffice?
I plan to submit the following to the list today (after I test):
diff --git a/cxx-lib/src/asn-octs.cpp b/cxx-lib/src/asn-octs.cpp
index 228774d..e857fd6 100644
--- a/cxx-lib/src/asn-octs.cpp
+++ b/cxx-lib/src/asn-octs.cpp
@@ -2,6 +2,7 @@
#include "asn-incl.h"
#include <stdlib.h>
+#include <iomanip>
_BEGIN_SNACC_NAMESPACE
@@ -92,7 +93,7 @@ void AsnOcts::PrintXML (std::ostream &os, const char *lpszTitle,
os << "<" << tagName << ">";
std::ios_base::fmtflags old_flags = os.flags();
- os << std::hex;
+ os << std::hex << std::setw(2) << std::setfill('0');
for (size_t i = 0; i < Len(); ++i) {
os << (unsigned int)(c_ustr()[i]);
}
Closing this now.
PrintXML presents
Identifier ::= OCTET STRING
as<OCTET_STRING>Identifier-'3132333435'H -- "12345" --</OCTET_STRING>
With attached patch OCTET STRING will be presented as:<Identifier typeName="OCTET_STRING">3132333435</Identifier>
=============================================