diff options
Diffstat (limited to 'kaddressbook/thumbnailcreator/ldifvcardcreator.cpp')
-rw-r--r-- | kaddressbook/thumbnailcreator/ldifvcardcreator.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp b/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp index 0ed562e18..3de0220f0 100644 --- a/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp +++ b/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp @@ -75,7 +75,13 @@ bool VCard_LDIFCreator::readContents( const TQString &path ) text.truncate(0); // read the file +#if defined(KABC_VCARD_ENCODING_FIX) + const TQByteArray data = file.readAll(); + const TQString contents( data ); + const TQCString contentsRaw( data.data(), data.size() ); +#else TQString contents = file.readAll(); +#endif file.close(); // convert the file contents to a KABC::Addressee address @@ -83,7 +89,11 @@ bool VCard_LDIFCreator::readContents( const TQString &path ) KABC::Addressee addr; KABC::VCardConverter converter; +#if defined(KABC_VCARD_ENCODING_FIX) + addrList = converter.parseVCardsRaw( contentsRaw ); +#else addrList = converter.parseVCards( contents ); +#endif if ( addrList.count() == 0 ) if ( !KABC::LDIFConverter::LDIFToAddressee( contents, addrList ) ) return false; |