Re: Various Qs about Intel and AppleScript
Re: Various Qs about Intel and AppleScript
- Subject: Re: Various Qs about Intel and AppleScript
- From: Christopher Nebel <email@hidden>
- Date: Mon, 6 Feb 2006 11:35:22 -0800
On Feb 4, 2006, at 8:06 AM, jj wrote:
At 2:15 PM +0100 1/11/06, jj wrote:
Will little-endian vs. big-endian affect AS code?
For example, if I compile an alias reference in a PowerPC
machine, will it
fail in the Intel one?
Or should I write/read Unicode text being aware of endian
differences?
This has little to see with the Intel machine. Anyway you may have on
your machines low-endian as well as big-endian Unicode files, and
most Unicode reader software understand both - except of course for
UTF-8 without the BOM where the software usually guesses its own
endian.
Yes, but for example, you can write "as list", where every member
is a chunk
of Unicode text, and I don't think actually the structure includes
a BOM (it
doesn't at all), so I was trying to ensure you can retrieve the
exact info
both from Intel and PPC when you read the data again (and seem
Chris ensures
a big-endian behaviour in both machines, at least till AppleScript is
re-newed ;-).
A BOM is merely one way to have endian-safe data. If all the
producers and consumers of a data stream agree on a particular
endianness, then you don't need any signaling tags like a BOM, and
that's what we did.
Incidentally, the concept of endianness is meaningless for UTF-8,
because UTF-8 is defined as a stream of 8-bit bytes. Endianness, at
least as far as Intel and PowerPC are concerned, only applies to
larger units, such as 16- and 32-bit words. Including a BOM in a
UTF-8 file is handy in that it's a signal that the data is in fact
UTF-8, but is otherwise unnecessary.
--Chris Nebel
AppleScript and Automator Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden