Re: Reading file containing UTF-8
Re: Reading file containing UTF-8
- Subject: Re: Reading file containing UTF-8
- From: Tom Robinson <email@hidden>
- Date: Thu, 06 Nov 2003 07:46:39 +1300
>
I think these two will do the job:
>
>
do shell script "cat ~/whatever/file.txt"
>
>
read alias "path:to:file.txt" as <<class utf8>>
Thanks for the reply jj. That does work, right up until I add buntil linefeedb, then it returns Unicode text but doesnbt recognise the UTF-8 sequences:
property somefile : alias ((path to desktop as text) & "Temporary Find List6 copy.txt")
property linefeed : ASCII character 10 -- Unix
set a to (read somefile until linefeed) as <<class utf8>>
log class of a
I need the read the file in chunks (line by line) because itbs going to be 15 Megs or so.
Cheers
--
Women DO come with instructions. Just ask them!
_______________________________________________
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.