fork(1) download
  1. print("Unicode: {}".format(
  2. hex(ord("薔"))[2:].upper()
  3. ))
  4.  
  5. print("Shift_JIS: {}".format(
  6. hex(int.from_bytes("薔".encode("shift_jis"), "big"))[2:].upper()
  7. ))
  8.  
  9. print("EUC-JP: {}".format(
  10. hex(int.from_bytes("薔".encode("euc-jp"), "big"))[2:].upper()
  11. ))
  12.  
  13. print("JISコード (iso-2022-jp): {}".format(
  14. (hex("一".encode("iso-2022-jp")[3])[2:]+hex("薔".encode("iso-2022-jp")[4])[2:]).upper()
  15. ))
  16.  
  17. print("Big5: {}".format(
  18. "".join([hex(x)[2:] for x in "薔".encode("big5")]).upper()
  19. ))
Success #stdin #stdout 0.02s 9724KB
stdin
Standard input is empty
stdout
Unicode: 8594
Shift_JIS: E54B
EUC-JP: E9AC
JISコード (iso-2022-jp): 302C
Big5: C1A5