[Vobject] Generate (serialize) Vcard with UTF8
Frederic Vautard
fred at tektosworld.com
Wed Jan 13 20:58:04 CST 2010
Hi,
I am using Vobject to parse and generate vcards. I have the following
issue to regenerate a Vcard with unicode fields:
First I parse the following vcard with "vcard = vobject.readOne(v)",
this is working well and I can display the name "Frédéric" on my GUI:
*BEGIN:VCARD
VERSION:3.0
FN:Frederic
N;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:;Fr=C3=A9d=C3=A9ric;;;
TEL:12345678
**END:VCARD*
When I try to re-generate the vcard, this is what I get:
> vcard.serialize()
*BEGIN:VCARD
VERSION:3.0
FN:Frederic
N:;Frédéric;;;
TEL:12345678
END:VCARD
*
How can I "force" serialize() to use
"*ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8*" for the name ? (Actually I
have the problem for Chinese characters but I use the French accent "é"
here as an example, the problem should remain the same).
Thank you in advance for your help on this issue and your previous help
as well !
Best Regards,
Frédéric.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.skyhouseconsulting.com/pipermail/vobject/attachments/20100114/64e70884/attachment.htm
More information about the VObject
mailing list