• 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: Write a file in utf8
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Write a file in utf8


  • Subject: Re: Write a file in utf8
  • From: "Mark J. Reed" <email@hidden>
  • Date: Wed, 5 Aug 2009 10:49:32 -0400

I think you need to get rid of the parentheses.  OMM (which is Leopard), this:

                  write (FileContent as «class utf8») to the_file

writes the content as Latin-1 - the casting just affects the value
seen by the write command, not the way it encodes it. Whereas this:

                   write FileContent as «class utf8» to the_file

yields UTF-8.  But it's clearer if you write it thus:

                    write FileContent to the_file as «class utf8»


--
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/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Write a file in utf8
      • From: Jay Louvion <email@hidden>
References: 
 >Write a file in utf8 (From: Jay Louvion <email@hidden>)
 >Re: Write a file in utf8 (From: Yvan KOENIG <email@hidden>)
 >Re: Write a file in utf8 (From: "Mark J. Reed" <email@hidden>)
 >Re: Write a file in utf8 (From: "Mark J. Reed" <email@hidden>)
 >Re: Write a file in utf8 (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Write a file in utf8
  • Next by Date: Re: Write a file in utf8
  • Previous by thread: Re: Write a file in utf8
  • Next by thread: Re: Write a file in utf8
  • Index(es):
    • Date
    • Thread