|
The original FreeStyle Libre software is known for incorrectly
truncating strings with UTF-8, which causes the multi-record strings not
to decode correctly.
But since the Libre actually sends these as they are provided, we can
calculate the checksum correctly if we do that _before_ replacing the
invalid codepoints.
This splits the `send_text_command` method into a public and a private
interface, with the public returning the expected string, while the
private returns the raw bytes. It should probably be changed to always
return bytes instead.
This change fixes https://github.com/glucometers-tech/glucometerutils/issues/103.
|