Decode xml-data of mac-adressbook

Jan Schenkel janschenkel at yahoo.com
Thu Jan 11 17:11:45 EST 2007


--- "R. Hillen" <mail at richard-hillen.de> wrote:
> Hello list,
> 
> on Mac OSX I try to get the contents of the
> adressbook;
> for each adress there is a xml-file in
> /Users/..../Library/Caches/ 
> com.apple.AdressBook/Metadata.
> 
> The  xml-file starts with
> <?xml version="1.0" encoding="UTF-8"?>
> 
> My adresses are german ones, so there are "umlauts"
> like ŠšŸ...
> If in the adressbook the city is "HŸrth" and I read
> the file contents by
> put url("file:/" & xmlfilename) into tdata,
> I get "Hürth" instead.
> 
> As I don«t know enough about encoding, may you give
> me a tip, what to  
> do to get the right chars?
> 
> Thank you.
> 
> Richard.
>

Hi Richard,

You'll have to use the 'uniEncode' and 'uniDecode'
functions to convert it from UTF-8 to UTF-16 and then
back to 1-byte characters. Here's a link to a post by
Mark Waddingham:
<http://mail.runrev.com/pipermail/use-revolution/2006-January/074653.html>

Hope this helped,

Jan Schenkel.

Quartam Reports for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com



More information about the use-livecode mailing list