diff -r 22a009561502 -r 2adfa4c60bff runtime/typemapping.py --- a/runtime/typemapping.py Fri Jan 19 19:58:44 2024 +0100 +++ b/runtime/typemapping.py Sat Jan 20 11:41:17 2024 +0100 @@ -42,7 +42,7 @@ "USINT": _t(c_uint8), "BYTE": _t(c_uint8), "STRING": (IEC_STRING, - lambda x: x.body[:x.len], + lambda x: x.body[:x.len].decode(), lambda t, x: t(len(x), x.encode() if type(x)==str else x)), "INT": _t(c_int16), "UINT": _t(c_uint16),