"read from" and non-lo-ascii characters
"read from" and non-lo-ascii characters
- Subject: "read from" and non-lo-ascii characters
- From: Matt Neuburg <email@hidden>
- Date: Mon, 20 Jun 2005 12:37:34 -0700
As you know, in the open for access / read from / close access dance, you
are given the option of doing "read from" only up to some character value
(you can say "until" or "before"). This should useful if you have a big file
and want to read in delimited bits.
I had a big file that I was going to generate by an export process from
another program, and in anticipation of this problem, I used option-1
(inverted exclamation point) as my field delimiter and option-2 (tm) as my
record delimiter.
When I tried to read the file using "until" or "before" I found that they
didn't work with those characters. Reading until or before "e" or "i" worked
fine, but not until or before option-1 or option-2. Text encodings were fine
(MacRoman was being used throughout, and when I read the whole file, the
characters in question came in perfectly), so I can only conclude that
reading "until" or "before" is just plain broken in case the character being
used is not lo-ascii.
(1) Does anyone have any wisdom to share on this?
(2) If I'm right about what the trouble is, maybe it would be a good thing
for Apple to fix this osax command, or at least document this limitation as
part of the dictionary description of these options.
In any case the frustration of having to discover and parse this kind of
behavior by trial and error is part of what makes people a bit nuts when
they grapple with AppleScript... :) m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
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