summaryrefslogtreecommitdiffabout
path: root/microkde
authorzautrix <zautrix>2004-10-14 06:42:01 (UTC)
committer zautrix <zautrix>2004-10-14 06:42:01 (UTC)
commita6dff815a9c6d3a91094573d23c28a8553fc7cc2 (patch) (side-by-side diff)
treea8830e9adcd72faa8178d4ee2517bfc31cda8653 /microkde
parent909d25797c50fc38c435834a68aaf60bf87e32f9 (diff)
downloadkdepimpi-a6dff815a9c6d3a91094573d23c28a8553fc7cc2.zip
kdepimpi-a6dff815a9c6d3a91094573d23c28a8553fc7cc2.tar.gz
kdepimpi-a6dff815a9c6d3a91094573d23c28a8553fc7cc2.tar.bz2
fixes umlaute in beaming
Diffstat (limited to 'microkde') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kapplication.cpp22
-rw-r--r--microkde/kapplication.h1
2 files changed, 23 insertions, 0 deletions
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp
index 98ef2f2..56c01af 100644
--- a/microkde/kapplication.cpp
+++ b/microkde/kapplication.cpp
@@ -66,2 +66,24 @@ void KApplication::showFile(QString caption, QString fn)
+bool KApplication::convert2latin1(QString fileName)
+{
+ QString text;
+ QFile file( fileName );
+ if (!file.open( IO_ReadOnly ) ) {
+ return false;
+
+ }
+ QTextStream ts( &file );
+ ts.setEncoding( QTextStream::UnicodeUTF8 );
+ text = ts.read();
+ file.close();
+ if (!file.open( IO_WriteOnly ) ) {
+ return false;
+ }
+ QTextStream tsIn( &file );
+ tsIn.setEncoding( QTextStream::Latin1 );
+ tsIn << text.latin1();
+ file.close();
+
+
+}
void KApplication::showText(QString caption, QString text)
diff --git a/microkde/kapplication.h b/microkde/kapplication.h
index 79cdb33..41546a0 100644
--- a/microkde/kapplication.h
+++ b/microkde/kapplication.h
@@ -22,2 +22,3 @@ class KApplication
static void showText(QString caption, QString text);
+ static bool convert2latin1(QString file);
};