6

I use od to print me the octal or hex of a file/stdin/string. This lets me see the ASCII, or UTF-8 encoded, values of my stdin.

But we don't live in ASCIIland anymore. Is there any command that will print out the unicode values/codepoints for the (presume) utf-8 encoded input? I want to know what unicode characters I'm seeing?

Gilles 'SO- stop being evil'
864k204 gold badges1.8k silver badges2.3k bronze badges
asked Apr 24, 2015 at 7:45
1

1 Answer 1

2

You can use this if you are on a little endian system:

iconv -f utf-8 -t ucs-4le | od -tx4

or this if you are on a big endian system:

iconv -f utf-8 -t ucs-4be | od -tx4
answered Apr 24, 2015 at 15:41

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.