def add(self, byte):
        """
        Push a byte onto the unicode string; if the byte contains or
        completes a full utf-8-encoded character, that new character
        will be included in the result of L{get}.
        """
        try:
            character = byte.decode('utf-8')
        except UnicodeDecodeError:
            if self._buf and isinstance(self._buf[-1], str):
                try:
                    character = (self._buf[-1] + byte).decode('utf-8')
                except __HOLE__:
                    self._buf[-1] = self._buf[-1] + byte
                else:
                    self._buf[-1] = character
            else:
                self._buf.append(byte)
        else:
            self._buf.append(character)
dataset/ETHPy150Open twisted/imaginary/imaginary/wiring/terminalui.py/AsynchronousIncrementalUTF8Decoder.add