No, in Python 3 the rules are:
'rb' reads in binary mode, returns raw bytes without doing any decoding;
'r' reads in text mode, returns Unicode text, using the codec/encoding
specified. By default, if no encoding is specified, I think UTF-8 is used,
but it may depend on the platform.
If you are getting decoding errors when reading the file, it is possible
that the file isn't actually UTF-8. One test you can do:
with open(dfile, 'rb') as f:
for line in f:
try:
s = line.decode('utf-8', 'strict')
except UnicodeDecodeError as err:
print(err)
If you need help deciphering the errors, please copy and paste them here and
we'll see what we can do.
--
Steven