ASCII vs. MacRoman (was Re: Standard Additions 'read' command - basic questions)
ASCII vs. MacRoman (was Re: Standard Additions 'read' command - basic questions)
- Subject: ASCII vs. MacRoman (was Re: Standard Additions 'read' command - basic questions)
- From: Chris Page <email@hidden>
- Date: Mon, 19 Jan 2004 14:21:04 -0800
On Jan 19, 2004, at 12:36, Christopher Nebel wrote:
The problem is that your delimiter string is being fetched as Unicode,
but then it looks for the Unicode code point in the data, which is
*not* 254 (or 255, or whatever), since your primary encoding is
probably MacRoman, which doesn't agree with Unicode at all above 127.
(127 and below -- that is, ASCII -- is fine.)
I realize this is a separate topic, but: In fact, it's misleading for
"ASCII character" to work with values above 127, which are not ASCII.
It's too bad people have played fast-and-loose with the term ASCII lo
these many decades, including nearly every mainstream programming
language. Really, "ASCII character" should produce an error if the
numeric value is not valid ASCII. Either it should have been named
"MacRoman character" or some other mechanism should have been created
for handling other character encodings.
In fact, it's not too late. It might be useful to rename it to
something like "MacRoman character" and provide "ASCII character" as a
synonym (so "ASCII character" could still be used, but it would
decompile to "MacRoman character").
I'll file a bug, but in the meantime, try using FS (field separator,
ASCII character 28) and RS (record separator, ASCII character 30)
instead -- that's what they were designed for.
I've always wondered where this is defined. Every piece of
documentation I've seen on ASCII fails to fully describe the control
characters and their meanings (though it's easy to guess what FS and RS
are for). Have you ever seen a detailed definition for FS and RS
anywhere? I'd really like to see better documentation on ASCII.
--
Chris Page - Software Wrangler - palmOne, Inc.
SmartFriends(TM) U: Languages and Libraries, Sept. 26-28
Keynote: STL Creator, Alexander Stepanov
<
http://SmartFriends.com/U>
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.