From fba4827c29257321c11528f8ff6567172efe2c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 29 May 2016 02:43:02 +0200 Subject: [PATCH] Fix utf8 handling in kaddressbook thumbnailcreator This relates to bug 2625 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- kaddressbook/thumbnailcreator/ldifvcardcreator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp b/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp index 44e4684f..5c0314c3 100644 --- a/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp +++ b/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp @@ -80,7 +80,9 @@ bool VCard_LDIFCreator::readContents( const TQString &path ) const TQString contents( data ); const TQCString contentsRaw( data.data(), data.size() ); #else - TQString contents = file.readAll(); + TQTextStream s( &file ); + s.setEncoding( TQTextStream::UnicodeUTF8 ); + TQString contents = s.read(); #endif file.close();