Hi all,
after some testing I suspect the problem in or around the parseVCard somehow
creating.
The phones report in vcard2.1. It is converted by syncevolution to v3 and
passed to the plugin.
The attached file shows the output of the syncevolution backend (tdepim).
addressbook: TDE addressbook ENTRY BEFORE - prints std::string item (the
vCard)
SE_LOG_DEBUG(getDisplayName(), "TDE addressbook ENTRY BEFORE
\n%s\n",item.c_str() );
Überdrüber OK
addressbook: TDE addressbook ENTRY FROM UTF - is the std::string value
converted to TQString via fromUtf8 as discussed in previous posts
TQString input = TQString::fromUtf8(item.data(),item.size());
std::string input_str(input.utf8(),input.utf8().length());
SE_LOG_DEBUG(getDisplayName(), "TDE addressbook ENTRY FROM UTF
\n%s\n",input_str.c_str() );
Überdrüber OK
addressbook: TDE addressbook ENTRY AFTER is the output of addressee after
converter.parseVCard(input) is called and converted to std::string
TDEABC::Addressee addressee = converter.parseVCard(input);
/* DEBUG */
TQString data;
if (m_type == TDEPIM_CONTACT_V21 )
data = converter.createVCard(addressee, TDEABC::VCardConverter::v2_1);
else
data = converter.createVCard(addressee, TDEABC::VCardConverter::v3_0);
std::string data_str(data.utf8(),data.utf8().length());
SE_LOG_DEBUG(getDisplayName(), "TDE addressbook ENTRY AFTER
\n%s\n",data_str.c_str() );
I could reproduce something similar in a test program by
std::string teststr(input.utf8(),input.utf8().length());
std::cout << teststr << "\n";
result NOK
This however does not explain the above problem as I see the broken äöü in
the AddressBook in TDE. This must be coming from parseVCard as after this
addressee is added to the AddressBook.
This is consistent BTW with my experience with KDE3 and opensync, where I
had same problems, but never had the balls to confront them.
However this works in my test program
std::string teststr(newItem.ascii());
std::cout << teststr << "\n";
and this contradicts the logic of ascii all äöü are there
regards