Due to our needs of our project, the headers could have binary values that represents Integer values over than ASCII such as 0x88, but the library does not allow it rasing an exception:
`bincopy.py in as_srec(self, number_of_data_bytes, address_length_bits)
684
685 if self._header:
--> 686 encoded_header = self._header.encode('utf-8')
687 record = pack_srec('0', 0, len(encoded_header), encoded_header)
688 header.append(record)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x88 in position 0: ordinal not in range(128)
`
Could you modify the library to not enconde in UTF-8 and allow any kind of value to not limit only string headers?
I made the header encoding and decoding optional in release 11.1.0. Use BinFile(header_encoding=None) to leave the header as an untouched bytes object. The default header encoding is still UTF-8.
Hello,
Due to our needs of our project, the headers could have binary values that represents Integer values over than ASCII such as 0x88, but the library does not allow it rasing an exception:
`bincopy.py in as_srec(self, number_of_data_bytes, address_length_bits) 684 685 if self._header: --> 686 encoded_header = self._header.encode('utf-8') 687 record = pack_srec('0', 0, len(encoded_header), encoded_header) 688 header.append(record)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x88 in position 0: ordinal not in range(128) `
Could you modify the library to not enconde in UTF-8 and allow any kind of value to not limit only string headers?
Many thanks!! Ferran.