• 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: AppleScript-Users Digest, Vol 4, Issue 352
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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:
http://www.satimage.fr/software/en/unicode_and_applescript.html

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

References: 
 >Re: AppleScript-Users Digest, Vol 4, Issue 352 (From: "Mr. Dan Pouliot" <email@hidden>)

  • Prev by Date: Re: AppleScript-Users Digest, Vol 4, Issue 352
  • Next by Date: GUI Scripting to toggle "Announce Time"?
  • Previous by thread: Re: AppleScript-Users Digest, Vol 4, Issue 352
  • Next by thread: Address book
  • Index(es):
    • Date
    • Thread