3 ms·
Explicit is better than implicit. The first line isnt a string, it's a collection of bytes, guessing that it's utf8 is not the right thing to do. The encode (o
by orf 9y ago
Explicit is better than implicit. The first line isnt a string, it's a collection of bytes, guessing that it's utf8 is not the right thing to do.
The encode (or is it decode? I always forget) defaults to utf8, which is what you should be using.
- Siecje 9y agoIt helps me to think encrypt for encode (convert to bytes) and decrypt for decode (convert to text).