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 19:04:13 -0500
On 2/7/07,
I wrote:
You're writing the text out as UTF-16
That part is true,,,
Unix command-line tools expect UTF-8.
... but that part is a massive over-simplification.
Many UNIX tools don't care about encoding at all; bytes is bytes. Those that do care will usually honor the settings of the LC environment variables. But that doesn't help you display the text any better. If you're just cating the file (or equivalent) to your terminal, then the terminal program determines what encoding is expected.
In Terminal.app, this is set in the Terminal->Window Settings dialog, under the Display tab, at the bottom ("Character Set Encoding").
Chances are it's set to UTF-8, but the possibility exists that it's not, so I thought I'd clarify a little.
I also wrote:
> 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.
To which Shane replied:
> write someStuff to fileRef as «class utf8»
Thanks! How come «class utf8» doesn't have a dictionary name?
--
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