How to print an int8 field as a char in decoder.appendTo() method?
Hi,
Let's suppose a field can have values 'A', 'B', 'C' and is encoded as a int8, uint8 or char on the wire.
Even when setting semanticType="char", the string representation of the message always shows the ordinal value of the field, e.g. 65 instead of 'A'.
Have I missed anything? Otherwise, would it be a good addition to allow printing those fields as chars instead of byte / short?
Thanks
Hi,
Let's suppose a field can have values 'A', 'B', 'C' and is encoded as a int8, uint8 or char on the wire.
Even when setting semanticType="char", the string representation of the message always shows the ordinal value of the field, e.g. 65 instead of 'A'.
Have I missed anything? Otherwise, would it be a good addition to allow printing those fields as chars instead of byte / short?
Thanks
The PR above prints foo='A' instead of foo=65, except when value is not printable, in which case it prints e.g. foo=\0 (numeric value preceded by \).
Open to suggestions