Using a shell/bash script, I need to convert some text to hexadecimals so I pipe the source text into hexdump, so far so good. The problem is æøå characters. They show up fine in the console (UTF-8), but the hexadecimal values hexdump provides isn't correct. All other standard latin letters. echo -en "Some text containing æøåÆØÅ"|hexdump -v -e '"xx" 1/1 "%02X"
, then I use sed to replace the xx with %. Well, all letters, punctations, new line, etc is, just not non-standard-latin letters.
So, how do I go about solving this? Is it the input codepage that is the problem, or is there some limitations wiht hexdump? Thanks!
EDIT: By codepage, I mean character encoding. Not 100% sure it is the same thing. Bear with me please! :)