Quantcast
Channel: Active questions tagged utf-8 - Stack Overflow
Viewing all articles
Browse latest Browse all 1223

Trying to print bits of of UTf-8 character (emoji '👍')

$
0
0

I am trying to print bits of of UTf-8 character. In that case an emoji.According to the the following video: https://www.youtube.com/watch?v=ut74oHojxqothe following code script.py (both from the script edited with vim and the python command line from the terminal

s = '👍'print(len(s))print(s[0])

should give the following output:

$ python script.py 4'xf0'

However it gives me

$ python script.py 1👍

Viewing all articles
Browse latest Browse all 1223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>