4 ms·
That's not the proper way. You should rarely need encode/decode if you make sure everything within Python is unicode. You ensure this by being specifying the en
by andreasvc 11y ago
That's not the proper way. You should rarely need encode/decode if you make sure everything within Python is unicode. You ensure this by being specifying the encoding when getting data from external sources such as files, the network, or external libraries.
- rcthompson 11y agoOf course I'm well aware this isn't the proper way to do it. I'm just saying it's the only way I've found that is successful with any degree of regularity. I've tried following the documentation as best I can, but like I said, half the time an encode ends up working where I thought I needed a decode or vice versa.