Jump to content
Che

Cum obtin acest cod in Python ?

Recommended Posts

Am U+1F498 care este un code unicode.

Facand asa:

print "&#" + str(int("0001F498", 16))

Imi arata asta: &#128152 

Care cica ar fi "HTML Entity (decimal): 💕" conform acestui site: https://www.fileformat.info/info/unicode/char/1f495/index.htm

 

Stie cineva cum as putea sa fac sa imi arate 55,357 in loc de acest 128152 de mai sus ?

Tot dupa situl de mai sus se pare ca ar fi un UTF-16, dar cum il pot obtine in python plecand de la unicode pointul de mai sus ?

Multumesc mult de tot!

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...