summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-06-27 10:38:24 (UTC)
committer zautrix <zautrix>2005-06-27 10:38:24 (UTC)
commit24cdc6d9bf9f31b036fae270b32cc85808280e68 (patch) (side-by-side diff)
tree6b1be13c17453011a1d71b5f0e8a4157282336cc /kaddressbook
parent16d3551a207f02679aeaeb943f00684db223934d (diff)
downloadkdepimpi-24cdc6d9bf9f31b036fae270b32cc85808280e68.zip
kdepimpi-24cdc6d9bf9f31b036fae270b32cc85808280e68.tar.gz
kdepimpi-24cdc6d9bf9f31b036fae270b32cc85808280e68.tar.bz2
fixx
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/xxport/csv_xxport.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/kaddressbook/xxport/csv_xxport.cpp b/kaddressbook/xxport/csv_xxport.cpp
index 81148d9..7281003 100644
--- a/kaddressbook/xxport/csv_xxport.cpp
+++ b/kaddressbook/xxport/csv_xxport.cpp
@@ -28,12 +28,13 @@ Copyright (c) 2004 Ulf Schenk
$Id$
*/
#include <qfile.h>
#include <qregexp.h>
#include <qtextstream.h>
+#include <qtextcodec.h>
#include <kfiledialog.h>
#ifndef KAB_EMBEDDED
#include <kio/netaccess.h>
#endif //KAB_EMBEDDED
@@ -148,12 +149,13 @@ KABC::AddresseeList CSVXXPort::importContacts( const QString& ) const
return KABC::AddresseeList();
}
void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list )
{
QTextStream t( fp );
+ t.setCodec( QTextCodec::codecForName("utf8") );
KABC::AddresseeList::ConstIterator iter;
KABC::Field::List fields = addressBook()->fields();
KABC::Field::List::Iterator fieldIter;
bool first = true;
@@ -174,13 +176,13 @@ void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list )
first = true;
for ( fieldIter = fields.begin(); fieldIter != fields.end(); ++fieldIter ) {
if ( !first )
t << ",";
- t << "\"" << (*fieldIter)->value( addr ).replace( QRegExp("\n"), "\\n" ) << "\"";
+ t << "\"" << (*fieldIter)->value( addr ) << "\"";
first = false;
}
t << "\n";
}
}