Re: "read from" and non-lo-ascii characters
Re: "read from" and non-lo-ascii characters
- Subject: Re: "read from" and non-lo-ascii characters
- From: Christopher Nebel <email@hidden>
- Date: Mon, 20 Jun 2005 16:21:09 -0700
On Jun 20, 2005, at 1:36 PM, jj wrote:
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.
Seems a bug. I tried encoding a file as Unicode text, then reading
until
"blah" as Unicode text. Seems that it recognizes the delimiters,
but it will
skip some characters... So, more bugs...
matt's problem is indeed a bug. It broke in Panther, in an attempt
to improve the behavior of reading UTF-16 files using delimiters; to
my knowledge, no one has reported it before. If you use a UTF-16
file, however -- add "as Unicode text" to the appropriate "read" and
"write" commands -- it should work.
As for jj's complaint, realize that the "before" and "until"
delimiters are defined to only be a single character. If you specify
a longer string, it will merely use the first character.
--Chris Nebel
AppleScript and Automator Engineering
P.S.: Obligatory pedantry: there is no such thing as "high" or "low"
ASCII. ASCII defines interpretations for bytes in the range
0...0x7F. If it's not in that range, it's not ASCII.
_______________________________________________
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