On 2020-03-06, Pieter van Oostrum <[email protected]> wrote: > Jon Ribbens <[email protected]> writes: >> On 2020-03-06, moi <[email protected]> wrote: >>> Le jeudi 5 mars 2020 13:20:38 UTC+1, Ben Bacarisse a ÄCcritâ : >>>> moi <[email protected]> writes: >>>> >>>> 'Ä¿'.encode('utf-8') >>>> > b'\xc3\xbf' >>>> >>>> 'Ä¿'.encode('utf-16-le') >>>> > b'\xff\x00' >>>> >>>> 'Ä¿'.encode('utf-32-le') >>>> > b'\xff\x00\x00\x00' >>> >>>> That all looks as expected. >>> Yes >>> >>>>Is there something about the output that puzzles you? >>> No >>> >>>>Did you have a question? >>> No, only a comment >>> >>> This buggy language is very amusing. >> >> What's the bug, or source of amusement? > > The bug is in the mental world of the OP.
Quite possibly. I must admit I was just interested to learn what they thought was wrong or amusing in the above. There's plenty of room to have reasonable differing opinions on Unicode strings and how they're implemented in languages, but it's not at all obvious what could be different in those specific expressions. -- https://mail.python.org/mailman/listinfo/python-list
