Re: Help with writing to a file --- weird characters.
Re: Help with writing to a file --- weird characters.
- Subject: Re: Help with writing to a file --- weird characters.
- From: "Mark J. Reed" <email@hidden>
- Date: Wed, 7 Feb 2007 17:21:08 -0500
You're writing the text out as UTF-16; Unix command-line tools expect
UTF-8. Try this:
$ iconv -f utf-16 -t utf-8 filename
That should display what you want.
Pretty sure there is a way to write text out from AppleScript as UTF-8
in the first place, but offhand I don't remember what it is.
On 2/7/07, Shane Stanley <email@hidden> wrote:
On 8/2/07 7:44 AM, "RH" <email@hidden> wrote:
> I'm using the folowing code to write some text to a file.....
>
> kittens
>
>
> In text edit the file looks fine however when I read it with a unix
utility I
> get
>
> ^@k^@i^@t^@t^@e^@n^@s
>
> I'm not sure what is going on.
It looks like your "kittens" is Unicode.
--
Shane Stanley <email@hidden>
AppleScript Pro Sessions Denver June 2007 <www.scriptingmatters.com/aspro>
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden
--
Mark J. Reed <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/mailman//archives/applescript-users
This email sent to email@hidden