Re: Address Book stops indexing after editing Notes field w/ Applescript?
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