While xxd(1) (which I didn't know about; thanks, Dean!) has a
number of clever options, the simplest way to use it is probably to
use its "-p" option and use it in a pipe:
% echo hello world | xxd -p -u
68656C6C6F20776F726C640A
% echo 68656C6C6F20776F726C640A | xxd -p -r
hello world
The man page ("man xxd") provides several more complex examples. I
was unclear from your original message whether you were working
with the hex digits, or if you were trying to show the underlying
bytes for the text.
As to the other part of your question -- what encoding is the text
stored in -- assuming the original text is as you claim and the
bytes you gave are correct, then I have no idea. It's no encoding
I can identify. It's not valid UTF-8, it uses two bytes for
accented characters so it can't be any of the ISO-8859 family, and
it doesn't match any of the East Asian encodings I know (Shift-JIS,
BIG5E, or GB2312). The source of the data might provide some clue.
--Chris Nebel
AppleScript Engineering
On Feb 19, 2007, at 4:39 AM, Andreas Kiel wrote:
Many thanks,
Looks like that's something which could help.
Do you know any links to examples? I'm not a "command line guru".
Regards
Andreas
On 19.02.2007, at 13:18, Dean Shavit wrote:
Have a look at the xxd command line tool
On Feb 19, 2007, at 5:40 AM, Andreas Kiel wrote:
There must be an easy and quick way to handle but I don't find it?
Any ideas?
Thanks
Andreas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list (Applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/c.nebel%
40apple.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list (Applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/
email@hidden
This email sent to email@hidden