by Sander Tekelenburg <user@[EMAIL PROTECTED]
>
Nov 23, 2007 at 04:23 AM
In article <towb-B60E07.19292522112007@[EMAIL PROTECTED]
>,
Tobias Weber <towb@[EMAIL PROTECTED]
> wrote:
> In article <user-54F565.18254822112007@[EMAIL PROTECTED]
>,
> Sander Tekelenburg <user@[EMAIL PROTECTED]
> wrote:
>
> > set nameList to (read listFile as «class utf8» using delimiter return)
> > as list
>
> That seems to be the correct answer to my "how to combise two 'as'
> parameters" question. Unfortunately in trying it I found out that as
> utf8 clashes with using delimiter and reverts to MacRoman. The following
> works:
>
> open for access listFile without write permission
> set nameText to read listFile as «class utf8»
> close access listFile
> set nameList to every paragraph of nameText
Good catch :)
Btw, no need to open for access if you only need to read the file. Added
bonus is that you won't need the usual error handling stuff for when
something fails and your script doesn't close access (thus keeping the
file inaccessible to any process).
set nameList to every paragraph of (read listFile as «class utf8»)
--
Sander Tekelenburg, <http://www.euronet.nl/~tekelenb/>
Mac user: "Macs only have 40 viruses, tops!"
PC user: "SEE! Not even the virus writers sup****t Macs!"