[Vobject] About vobject's usage

Lars Immisch lars at ibp.de
Wed Aug 16 10:44:32 CDT 2006


Hi,

>> Umm, the file isn't UTF-16 by any chance? That is what Address Book 
>> will export into.
>>
>> I use something like:
>>
>>     f = codecs.open('contacts.vcf', 'r', encoding='UTF-16')
>>
>>     vcards = readComponents(f)
> 
> Oops, good catch, that's probably part of what's going on.
> 
> In vobject 0.4.1 I changed the unicode encoding detection to check 
> utf-16 as well as utf-8, so this should no longer be necessary, but if 
> Pablo's using an older version that could explain the problem.

In hindsight Pablo said:

 > After doing the OS X -> GNU/Linux conversions (basically removing the 
 > CTRL-M and CTRL-@ from the file) I tried to load it using vobject...

So I guess he tried the UTF-16 to ASCII conversion manually (the @ would 
have been every other character).

Pablo: please try again with the original file and the code fragment I 
sent you.

- Lars


More information about the VObject mailing list