Python Forum
tool wanted: to convert utf8 <-> unicode in hex
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tool wanted: to convert utf8 <-> unicode in hex
#9
Iconv works with the raw values, if you have it as a hex string you need to transform it first.
And the result is also raw bits, so:
Output:
$> echo "にほんご" | iconv -f UTF-8 -t UTF-16 | xxd -p fffe6b307b30933054300a00 $> echo -n fffe6b307b30933054300a00 | xxd -r -p | iconv -f UTF-16 -t UTF-8 にほんご
You need to have some font with japanese characters to see this correctly...

I find xxd more practical than hexdump, although you can achieve similar results.
Reply


Messages In This Thread
RE: tool wanted: to convert utf8 <-> unicode in hex - by killerrex - May-21-2018, 10:27 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020