summaryrefslogtreecommitdiffstats
path: root/tdeabc/vcardparser/vcardparser.cpp
diff options
context:
space:
mode:
authorEmanoil Kotsev <deloptes@gmail.com>2016-05-29 02:31:06 +0200
committerSlávek Banko <slavek.banko@axis.cz>2016-05-29 02:31:06 +0200
commit4ceb2b158b3ed1ba1c78ab886b08a0bf40577d51 (patch)
tree4a848e8523433e697f2172ade0fcc1b845ded1ef /tdeabc/vcardparser/vcardparser.cpp
parent51efac909d7b116c8b0ca58fcd4e74ff58f31091 (diff)
downloadtdelibs-4ceb2b158b3ed1ba1c78ab886b08a0bf40577d51.tar.gz
tdelibs-4ceb2b158b3ed1ba1c78ab886b08a0bf40577d51.zip
Fix utf8 support in tdeabc vCard parser
This resolves bug 2625 Signed-off-by: Emanoil Kotsev <deloptes@gmail.com>
Diffstat (limited to 'tdeabc/vcardparser/vcardparser.cpp')
-rw-r--r--tdeabc/vcardparser/vcardparser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tdeabc/vcardparser/vcardparser.cpp b/tdeabc/vcardparser/vcardparser.cpp
index 7ac07ce22..f8fe63791 100644
--- a/tdeabc/vcardparser/vcardparser.cpp
+++ b/tdeabc/vcardparser/vcardparser.cpp
@@ -151,8 +151,8 @@ VCard::List VCardParser::parseVCards( const TQString& text )
input = TQCString(value.latin1());
KCodecs::quotedPrintableDecode( input, output );
}
- } else {
- output = TQCString(value.latin1());
+ } else { //assume it's in UTF-8 (as used in previous KDE versions)
+ output = TQCString(value.utf8());
}
if ( params.findIndex( "charset" ) != -1 ) { // have to convert the data
@@ -275,7 +275,7 @@ TQString VCardParser::createVCards( const VCard::List& list )
for ( uint i = 0; i <= ( textLine.length() / FOLD_WIDTH ); ++i )
text.append( ( i == 0 ? "" : " " ) + textLine.mid( i * FOLD_WIDTH, FOLD_WIDTH ) + "\r\n" );
} else
- text.append( textLine + "\r\n" );
+ text.append( textLine + "\r\n" );
}
else {
// URIs can be full of weird symbols, etc. so bypass all checks