Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text interpretation/reading question



Thanks,

I played around a little with the xxd and figured out using the -p option. Unfortunately that hadn't been the solution.
The file's text encoding is either 6937/2-1983/Add.1:1989 (the example I sent) or from ISO 8859/5 - ISO 8859/8 their might be more since those do not cover eastern languages.


I just read the file (in chunks). The first 1024 bytes declare the language, title etc.
The other blocks do have a length of 128 and text starts at 17-128.


The tec doc about this format can be found at:
http://www.ebu.ch/CMSimages/en/tec_doc_t3264_tcm6-10528.pdf

I've attached the source (hope that works with the listserver)

Attachment: BRPTBDFaceOff.STL.zip
Description: Zip archive


Thanks Andreas


On 22.02.2007, at 02:46, Christopher Nebel wrote:

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

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden

References: 
 >Text interpretation/reading question (From: Andreas Kiel <email@hidden>)
 >Re: Text interpretation/reading question (From: Dean Shavit <email@hidden>)
 >Re: Text interpretation/reading question (From: Andreas Kiel <email@hidden>)
 >Re: Text interpretation/reading question (From: Christopher Nebel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.