Re: AppleScript-Users Digest, Vol 4, Issue 352
Re: AppleScript-Users Digest, Vol 4, Issue 352
- Subject: Re: AppleScript-Users Digest, Vol 4, Issue 352
- From: Philip Aker <email@hidden>
- Date: Sat, 28 Jul 2007 18:43:56 -0700
On 2007-07-28, at 18:31:22, Mr. Dan Pouliot wrote:
that is precisely what I did, following the instructions here:
and yet the file that it generated was still (maddeningly) UTF-16.
That said, I think I found the solution (though not in AppleScript). The app that is generating the UTF-16 file is Filemaker, and I just figured out how to tell Filemaker what encoding to save as. So I'm all set!
JFTR, probably the best conversion utility available in the world is 'iconv' by IBM and it is included in recent versions of Mac OS X. If you only need to convert files where the input and output encodings are known, it's an excellent choice. Here's a usage example:
set {fin, fout} to {quoted form of (POSIX path of (choose file)), quoted form of (POSIX path of (choose file name))} do shell script "iconv -f utf-16 -t utf-8 " & fin & " > " & fout
Use < x-man-page://iconv> for details about which input format to use if you know the encoding the input file has. It has options for big and little endian BOM marked UTF-16 files.
Philip Aker email@hidden
|
_______________________________________________
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