how to uniencode text for VCard v. 3.0?

Klaus Major klaus at major-k.de
Wed Jun 11 08:40:03 EDT 2008


Hi Dave,

> On 11 Jun 2008, at 09:00, Klaus Major wrote:
>> Hi all,
>> as the subject says, I am trying to export addresses to the VCard  
>> format 3.0.Lots of german adresses with umlauts etc.!
>> But whatever I try, I cannot figure out how to encode the strings :-/
>> I thought that:
>> put uniencode(fld "vcard","UTF8" into url("binfile:...)
>> would do the trick, but nada.
>> Mac "Addressbook" does not want to import them and "TextEdit" does  
>> not show the umlauts,
>> although I open the files manually and select "Textencoding:  
>> Unicode UTF8" in the open dialog.
>> Assuming the text in the field is "plain Rev text", and that you  
>> need to export UTF-8. I think it's a two-step process.
> put uniEncode(fld "vcard") into tVar ## create 2-byte unicode
> put uniDecode(tVar, "UTF8") into tUTF8Var  ## decode to UTF8
> put tUTF8Var iinto url ("binfile:" & etc.)

OH YEAH! That's it!
Shows up correctly in TextEdit and imports fine into AddressBook.

Thanks a million times, you are my hero!
Please remember: NO capes! :-D

> Dave

O sewa ni narimashita, yoi ichinichi wo! :-)


Best

Klaus Major
klaus at major-k.de
http://www.major-k.de





More information about the use-livecode mailing list