Closed
Description
In our messages we are definiting a fields which contian binary data. For this we are using the varDataEncoding composite defined as follows.
<composite name="varDataEncoding">
<type name="length" primitiveType="uint16" />
<type name="varData" primitiveType="uint8" length="0" characterEncoding="UTF-8" />
</composite>
My questions go to the "characterEncoding" attribute:
-
When we use this with the Java Code generator we get methods generated which allow us to access the data both as a String but also as a binary buffer / array ... This is fine, we do not need the String representation so we simply do not call that method.
-
In the Golang generator, however, when enabling the range check, the decoder throws an error, complaining that the bytes we put into the field are not utf8 valid.
We need some guidance on how to deal with this:
- should we define the protocol differently if we have binary content?
- or, is this a bug in the golang generator?
Metadata
Metadata
Assignees
Labels
No labels