From 8287a1bd710e1d4a37ca5a3921ed2349befb404d Mon Sep 17 00:00:00 2001 From: Arkadiusz Bulski Date: Wed, 7 Mar 2018 02:02:55 +0100 Subject: CString supports UTF-16/32-LE/BE --- glucometerutils/drivers/otverio2015.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/glucometerutils/drivers/otverio2015.py b/glucometerutils/drivers/otverio2015.py index 1fe630a..a7cadf5 100644 --- a/glucometerutils/drivers/otverio2015.py +++ b/glucometerutils/drivers/otverio2015.py @@ -53,8 +53,7 @@ _QUERY_REQUEST = construct.Struct( _QUERY_RESPONSE = construct.Struct( lifescan_binary_protocol.COMMAND_SUCCESS, - # This should be an UTF-16L CString, but construct does not support it. - 'value' / construct.GreedyString(encoding='utf-16-le'), + 'value' / construct.CString(encoding='utf-16-le'), ) _READ_PARAMETER_REQUEST = construct.Struct( -- cgit v1.2.3