summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-10-07 13:22:40 (UTC)
committer zautrix <zautrix>2004-10-07 13:22:40 (UTC)
commitd14d61ebb2e41329465883a0dfce719d69fc3f3e (patch) (unidiff)
tree39330d3848e530f9ba8deac4086685674acdc839
parent826dc960353e47a60aba13916189c45ef3392c1e (diff)
downloadkdepimpi-d14d61ebb2e41329465883a0dfce719d69fc3f3e.zip
kdepimpi-d14d61ebb2e41329465883a0dfce719d69fc3f3e.tar.gz
kdepimpi-d14d61ebb2e41329465883a0dfce719d69fc3f3e.tar.bz2
utf8 fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index a663427..28af135 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -934,10 +934,10 @@ void KServerSocket::send_file()
934 } 934 }
935 mSyncActionDialog->setCaption( i18n("Sending file...") ); 935 mSyncActionDialog->setCaption( i18n("Sending file...") );
936 QTextStream ts( &file ); 936 QTextStream ts( &file );
937 ts.setCodec( QTextCodec::codecForName("utf8") ); 937 ts.setEncoding( QTextStream::Latin1 );
938
938 QTextStream os( mSocket ); 939 QTextStream os( mSocket );
939 os.setCodec( QTextCodec::codecForName("utf8") ); 940 os.setEncoding( QTextStream::Latin1 );
940 //os.setEncoding( QTextStream::UnicodeUTF8 );
941 while ( ! ts.atEnd() ) { 941 while ( ! ts.atEnd() ) {
942 os << ts.readLine() << "\n"; 942 os << ts.readLine() << "\n";
943 } 943 }
@@ -990,7 +990,7 @@ void KServerSocket::readBackFileFromSocket()
990 990
991 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); 991 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1));
992 QTextStream ts ( &file ); 992 QTextStream ts ( &file );
993 ts.setCodec( QTextCodec::codecForName("utf8") ); 993 ts.setEncoding( QTextStream::Latin1 );
994 mSyncActionDialog->setCaption( i18n("Writing file to disk...") ); 994 mSyncActionDialog->setCaption( i18n("Writing file to disk...") );
995 ts << piFileString; 995 ts << piFileString;
996 mSocket->close(); 996 mSocket->close();
@@ -1028,7 +1028,7 @@ void KCommandSocket::readFile( QString fn )
1028 mFirst = true; 1028 mFirst = true;
1029 mSocket->connectToHost( mHost, mPort ); 1029 mSocket->connectToHost( mHost, mPort );
1030 QTextStream os( mSocket ); 1030 QTextStream os( mSocket );
1031 os.setEncoding( QTextStream::UnicodeUTF8 ); 1031 os.setEncoding( QTextStream::Latin1 );
1032 os << "GET " << mPassWord << "\r\n"; 1032 os << "GET " << mPassWord << "\r\n";
1033 mTimerSocket->start( 10000 ); 1033 mTimerSocket->start( 10000 );
1034} 1034}
@@ -1054,9 +1054,9 @@ void KCommandSocket::writeFileToSocket()
1054 return ; 1054 return ;
1055 } 1055 }
1056 QTextStream ts2( &file2 ); 1056 QTextStream ts2( &file2 );
1057 ts2.setCodec( QTextCodec::codecForName("utf8") ); 1057 ts2.setEncoding( QTextStream::Latin1 );
1058 QTextStream os2( mSocket ); 1058 QTextStream os2( mSocket );
1059 os2.setCodec( QTextCodec::codecForName("utf8") ); 1059 os2.setEncoding( QTextStream::Latin1 );
1060 os2 << "PUT " << mPassWord << "\r\n";; 1060 os2 << "PUT " << mPassWord << "\r\n";;
1061 while ( ! ts2.atEnd() ) { 1061 while ( ! ts2.atEnd() ) {
1062 os2 << ts2.readLine() << "\n"; 1062 os2 << ts2.readLine() << "\n";
@@ -1075,7 +1075,7 @@ void KCommandSocket::sendStop()
1075 } 1075 }
1076 mSocket->connectToHost( mHost, mPort ); 1076 mSocket->connectToHost( mHost, mPort );
1077 QTextStream os2( mSocket ); 1077 QTextStream os2( mSocket );
1078 os2.setCodec( QTextCodec::codecForName("utf8") ); 1078 os2.setEncoding( QTextStream::Latin1 );
1079 os2 << "STOP\r\n"; 1079 os2 << "STOP\r\n";
1080 mSocket->close(); 1080 mSocket->close();
1081 if ( mSocket->state() == QSocket::Idle ) 1081 if ( mSocket->state() == QSocket::Idle )
@@ -1120,7 +1120,7 @@ void KCommandSocket::readFileFromSocket()
1120 } 1120 }
1121 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); 1121 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1));
1122 QTextStream ts ( &file ); 1122 QTextStream ts ( &file );
1123 ts.setCodec( QTextCodec::codecForName("utf8") ); 1123 ts.setEncoding( QTextStream::Latin1 );
1124 ts << mFileString; 1124 ts << mFileString;
1125 file.close(); 1125 file.close();
1126 mFileString = ""; 1126 mFileString = "";