Converting UTF-16 files to UTF-8 or MacRoman (ascii)
Converting UTF-16 files to UTF-8 or MacRoman (ascii)
- Subject: Converting UTF-16 files to UTF-8 or MacRoman (ascii)
- From: "Mr. Dan Pouliot" <email@hidden>
- Date: Fri, 27 Jul 2007 21:19:15 -0400
I need to automate the conversion of a UTF-16 file to either UTF-8 or
MacRoman. I know this can be done w/BBEdit or maybe even
TextWrangler, but I was hoping for a pure AppleScript solution. I've
been banging my head against a wall. I've been reading the contents
of the UTF-16 file, coercing it to a string, then writing it to a new
file as a string. I've even tried the "extract string" command. In
very case, the new file that's made starts out MacRoman, but as soon
as I dump the text into it, it becomes UTF-16. I notice that when I
display dialog on the first few characters of my data I can see the
BOM is there. Trying to strip out the first 2 characters makes the
file go wacky from a web browser perspective. Any help would be
greatly appreciated!
--
Dan Pouliot <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