|
|
@ -1029,7 +1029,7 @@ void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQStri
|
|
|
|
if (m_option->m_encoding == "utf8")
|
|
|
|
if (m_option->m_encoding == "utf8")
|
|
|
|
currentStream.setEncoding(TQTextStream::UnicodeUTF8);
|
|
|
|
currentStream.setEncoding(TQTextStream::UnicodeUTF8);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
currentStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding));
|
|
|
|
currentStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding.ascii()));
|
|
|
|
TQString line = currentStream.read(),
|
|
|
|
TQString line = currentStream.read(),
|
|
|
|
backupLine = line;
|
|
|
|
backupLine = line;
|
|
|
|
|
|
|
|
|
|
|
@ -1068,7 +1068,7 @@ void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQStri
|
|
|
|
if (m_option->m_encoding == "utf8")
|
|
|
|
if (m_option->m_encoding == "utf8")
|
|
|
|
newStream.setEncoding(TQTextStream::UnicodeUTF8);
|
|
|
|
newStream.setEncoding(TQTextStream::UnicodeUTF8);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
newStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding));
|
|
|
|
newStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding.ascii()));
|
|
|
|
newStream << line;
|
|
|
|
newStream << line;
|
|
|
|
newFile.close();
|
|
|
|
newFile.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1121,7 +1121,7 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS
|
|
|
|
if (m_option->m_encoding == "utf8")
|
|
|
|
if (m_option->m_encoding == "utf8")
|
|
|
|
oldStream.setEncoding(TQTextStream::UnicodeUTF8);
|
|
|
|
oldStream.setEncoding(TQTextStream::UnicodeUTF8);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
oldStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding));
|
|
|
|
oldStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding.ascii()));
|
|
|
|
TQString line = oldStream.read();
|
|
|
|
TQString line = oldStream.read();
|
|
|
|
|
|
|
|
|
|
|
|
oldFile.close();
|
|
|
|
oldFile.close();
|
|
|
@ -1146,7 +1146,7 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS
|
|
|
|
if (m_option->m_encoding == "utf8")
|
|
|
|
if (m_option->m_encoding == "utf8")
|
|
|
|
newStream.setEncoding(TQTextStream::UnicodeUTF8);
|
|
|
|
newStream.setEncoding(TQTextStream::UnicodeUTF8);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
newStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding));
|
|
|
|
newStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding.ascii()));
|
|
|
|
newStream << line;
|
|
|
|
newStream << line;
|
|
|
|
newFile.close();
|
|
|
|
newFile.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1340,7 +1340,7 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa
|
|
|
|
if (m_option->m_encoding == "utf8")
|
|
|
|
if (m_option->m_encoding == "utf8")
|
|
|
|
stream.setEncoding(TQTextStream::UnicodeUTF8);
|
|
|
|
stream.setEncoding(TQTextStream::UnicodeUTF8);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
stream.setCodec(TQTextCodec::codecForName(m_option->m_encoding));
|
|
|
|
stream.setCodec(TQTextCodec::codecForName(m_option->m_encoding.ascii()));
|
|
|
|
TQString line = stream.read();
|
|
|
|
TQString line = stream.read();
|
|
|
|
file.close();
|
|
|
|
file.close();
|
|
|
|
|
|
|
|
|
|
|
|