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?


1 Answer 1


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.