Skip to content

Commit c36a50d

Browse files
Decode CAPut'd strings in the same way .set() does
1 parent 6b45466 commit c36a50d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

softioc/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def __getattr__(self, field):
9898
if field == 'TIME':
9999
return self.__get_time(address)
100100
elif field_type == DBF_STRING:
101-
return string_at(cast(address, c_char_p)).decode()
101+
return string_at(cast(address, c_char_p)).decode(errors="replace")
102102
elif field_type in [DBF_INLINK, DBF_OUTLINK]:
103103
return cast(address, POINTER(c_char_p))[0].decode()
104104
else:

0 commit comments

Comments
 (0)