Hello.
I'm trying to import a vcard file generated by a groupware application to opimd (and later to qtopia addressbook too). Some of the contacts of the vcard are Chinese and their names are therefore written in hanzi (Chinese characters). The import doesn't work, I suspect it stops when the parsing process reaches one of those contact.
The error I get is:

Traceback (most recent call last):
  File "/bin/pisi", line 153, in <module>
    pisicli.startCLI()
  File "/opt/pisi/pisicli.py", line 232, in startCLI
    source[0].load()
  File "/opt/pisi/modules/contacts_vcf.py", line 100, in load
    for x in comps:
File "/usr/lib/python2.6/site-packages/vobject/base.py", line 1031, in readComponents
    vline = textLineToContentLine(line, n)
File "/usr/lib/python2.6/site-packages/vobject/base.py", line 888, in textLineToContentLine return ContentLine(*parseLine(text, n), **{'encoded':True, 'lineNumber' : n}) File "/usr/lib/python2.6/site-packages/vobject/base.py", line 273, in __init__
    self.value = unicode(self.value, charset)
  File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe4 in position 3: unexpected end of data

I know this is not the first issue with encoding on pisi, but I don't know if there's a solution for this problem yet. This is quite important for me, because I have many contacts showing a Chinese name

Thanks
urodelo

_______________________________________________
Shr-User mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-user

Reply via email to