• 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: Address Book stops indexing after editing Notes field w/ Applescript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Address Book stops indexing after editing Notes field w/ Applescript?


  • Subject: Re: Address Book stops indexing after editing Notes field w/ Applescript?
  • From: Spamstop <email@hidden>
  • Date: Tue, 08 Apr 2008 10:49:51 -0700

On leopard, aren't 'text' and 'string' synonymous? I did have to read the note out by doing:
set mynote to note of thisperson as string


However, a script that does the following, with no reference at all to 'string' or 'text' also causes the problem.

   repeat for every person
       set note of person to note of person
   end repeat

I'm fairly certain that there aren't improper NULL characters introduced. Dumping the database with sqlite3 shows that the NOTE text in the ZABCDNOTE table is UTF-8 encoded, without any funny NULL characters.

Anyone know of a way to talk with an Address Book developer, or to file a bug against AB?

Laine Lee wrote:
On 4/6/08 10:49 PM, "spamstop" <email@hidden> wrote:

After playing around with Address Book's SQLite database, it seems that
using applescript to update the Note field causes the ZSTRINGFORINDEXING
string of ZCONTACTINDEX to become NULL for the modified contacts. It's
VERY possible that this is conditional on some other funky text in the
Note field (maybe that paragraph character), though it seems unlikely.

Is it possible that your script reads unicode text as a string, thereby introducing null characters (the extra Unicode byte for each character) into one or more of your objects?

Maybe you could try something like this to get rid of nulls in improperly
converted text (I found it at the Bombich site), then test further.

sudo perl -p -i -e 's/\000//g' /path/to/target_file.txt


_______________________________________________ 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: Address Book stops indexing after editing Notes field w/ Applescript?
      • From: Laine Lee <email@hidden>
References: 
 >Re: Address Book stops indexing after editing Notes field w/ Applescript? (From: Laine Lee <email@hidden>)

  • Prev by Date: Re: Address Book stops indexing after editing Notes field w/ Applescript?
  • Next by Date: Re: Address Book stops indexing after editing Notes field w/ Applescript?
  • Previous by thread: Re: Address Book stops indexing after editing Notes field w/ Applescript?
  • Next by thread: Re: Address Book stops indexing after editing Notes field w/ Applescript?
  • Index(es):
    • Date
    • Thread