I'm having some trouble reproducing this. I download the output uploaded and was able to read it with
import re
smart_support_regex = re.compile('SMART support is:\s+Available')
output = open('smartctl unicode.txt', 'rb').read()
match = smart_support_regex.search(output.decode('utf-8')
match is not None
True
If you modify
match = smart_support_regex.search(output.decode('utf-8'))
To
match = smart_support_regex.search(output.decode('utf-8', 'replace'))
I'm having some trouble reproducing this. I download the output uploaded and was able to read it with
import re regex.search( output. decode( 'utf-8' )
smart_support_regex = re.compile('SMART support is:\s+Available')
output = open('smartctl unicode.txt', 'rb').read()
match = smart_support_
match is not None
True
If you modify
match = smart_support_ regex.search( output. decode( 'utf-8' ))
To
match = smart_support_ regex.search( output. decode( 'utf-8' , 'replace'))
Does the smartctl test pass?