• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Reading file containing UTF-8
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: how to access the folder/directory popup button in the nav dialog
  • Next by Date: Re: Index to XML
  • Previous by thread: Re: Reading file containing UTF-8
  • Next by thread: Re: Reading file containing UTF-8
  • Index(es):
    • Date
    • Thread