Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

question on exporting vcard to UTF-16 file



Hi, there,

I have a question about the new address book application in leopard.

An applescript like this works fine on tiger and exports a readable
text file in UTF-8.

tell application \"Finder\"
  set theFolder to folder \"TemporaryItems\" of folder \"Caches\" of
folder \"Library\" of home
end tell

tell application \"Address Book\"
  set theVcard to (vcard of my card) as Unicode text
  set theFile to (theFolder as text) & \"myAddressBookCard.vcf\"
  set theFileHandle to open for access theFile with write permission
      write (ASCII character of 254) to theFileHandle
      write (ASCII character of 255) to theFileHandle
  write theVcard to theFileHandle
  close access theFileHandle
end tell

But on leopard, it created a UTF-16 file with no line break. Why it's
so different? Any parameter available to the addressbook application
can force it to create the same file as that on tiger?

Thanks.
Koifans
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.