Is there a Python library that can detect (and possibly decode) the encoding of a string?
I found chardet, but it gives me an error using:
chardet.detect(self.ui.TextFrom.toPlainText())
got: = chardet.detect(self.ui.TextFrom.toPlainText())
File .... u.feed(aBuf) File ....
if self._highBitDetector.search(aBuf):
TypeError: buffer size mismatch
Also:
print type(self.ui.TextFrom.toPlainText())
source
share