4 ms·
Python 3.9.9 (main, Nov 20 2021, 21:30:06) [GCC 11.1.0] on linux
by bvrmn 5y ago
Python 3.9.9 (main, Nov 20 2021, 21:30:06)
[GCC 11.1.0] on linux
- fastball 5y agoEDIT: I can't seem to replicate this on my Ubuntu system. Strange. Ah, interesting, I suppose then there is a difference in the way Linux handles strings? Didn't realize that, very unfortunate if true. I am running MacOS.
- bvrmn 5y agoActually browser normalized string and it works for me also. Here is original byte sequence: >>> b'n\xcc\x83'.decode() 'ñ' >>> b'n\xcc\x83'.decode()[0] 'n' >>> b'n\xcc\x83'.decode()[1] '̃' But I agree, it's rare case when you need to deal with non-normalized data.