• 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: text Encoding with Write to file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: text Encoding with Write to file


  • Subject: Re: text Encoding with Write to file
  • From: Christopher Nebel <email@hidden>
  • Date: Mon, 9 Jan 2006 12:47:41 -0800

On Jan 9, 2006, at 2:18 AM, Bastiaan Boertien wrote:

Well the problem is that I want to write a file with MacRoman text encoding. I found a lot on the internet and it doesn't work

They said that write [...] as string will be MacRoman text encoding but this doesn't work.

Well, maybe. Technically, "as string" doesn't force MacRoman, it forces your "primary encoding", which is dictated by the first language in your International preferences. For most people on this list, that's English (or possibly another Western European language, such as French, German, or Dutch), and therefore the primary encoding is MacRoman. For a typical Japanese user, it would be Japanese and hence MacJapanese.


How are you determining that the file isn't MacRoman? file(1) is trivial to fool, since it mostly relies on the first few bytes of the file. Similarly, I wouldn't trust any BSD tool to know the first thing about MacRoman, and that includes pico. Try just opening it in TextEdit, ask for MacRoman, and see what you get.


--Chris Nebel AppleScript and Automator Engineering

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >text Encoding with Write to file (From: Bastiaan Boertien <email@hidden>)

  • Prev by Date: Re: display alert parameters
  • Next by Date: Re: similar strings
  • Previous by thread: Re: text Encoding with Write to file
  • Next by thread: "path to resource" in a tell Finder statement doesn't work
  • Index(es):
    • Date
    • Thread