Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.12.0, 1.11.2
-
None
-
None
-
None
Description
Record fields of type 'bytes' currently utf-8 encode (the call is to '<string>'.encode() which defaults to using utf8) their default values, which (as far as I can tell) is incorrect.
This means that if you have a bytes field with a default value of "\u00ff\u00ff", then if the defaul is used during decoding, the value b'\xc3\xbf\xc3\xbf' is returned, rather than the expected b'\xff\xff'
Avro < 1.11 appears to do the correct thing here.