Re: Latin-1 output
Re: Latin-1 output
- Subject: Re: Latin-1 output
- From: Philip Aker <email@hidden>
- Date: Mon, 21 Jul 2008 04:16:49 -0700
On 08-07-21, at 03:14, Jan Erik Moström wrote: I'm trying to figure out how I should write to get AS to use latin-1 when writing to a file
write "Hello" as ???? to f
I can't find any hint on how to do this, does anyone know?
Here's one possibility:
set utxt to "héllö" as Unicode textset dest to quoted form of (POSIX path of ((choose file name) as text)) set tfile to "/tmp/utxt.txt" set pfile to (POSIX file tfile)
try set f to open for access pfile with write permission write utxt to f as «class utf8» close access f on error errs number errn try close access f end try end try
do shell script "iconv -f UTF-8 -t LATIN1 " & tfile & " > " & dest
Philip Aker
Democracy: Two wolves and a sheep voting on lunch. |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden