Registry: Move control of the StrLike output to the UIs

This commit is contained in:
Mike Auty
2020-07-16 19:44:18 +01:00
committed by ikelos
parent 5571f19b09
commit b31f9eb6e2
2 changed files with 14 additions and 5 deletions
@@ -32,9 +32,5 @@ class StrLike(bytes):
return super().__new__(cls, original)
def __init__(self, original: bytes, encoding: str = 'utf-16-le'):
self.original = original
self._encoding = encoding
self.encoding = encoding
bytes.__init__(original)
def __str__(self):
return str(self.original, encoding = self._encoding, errors = 'replace').split("\x00")[0]