From kde-commits Thu Sep 04 13:52:17 2008 From: Jason Harris Date: Thu, 04 Sep 2008 13:52:17 +0000 To: kde-commits Subject: KDE/kdeedu/kstars/kstars Message-Id: <1220536337.407881.12512.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=122053634917605 SVN commit 857041 by harris: Apply small patch from Ralf Habacker to fix reading of UTF-8-encoded files on win32. Though linux systems don't seem to need the call to QTextStream::setEncoding("UTF-8"), it doesn't seem to do any harm, so I added the two calls without any #ifdef wrappers. Thanks for the patch Ralf! CCMAIL: kstars-devel@kde.org CCMAIL: ralf.habacker@freenet.de M +2 -0 ksfilereader.cpp --- trunk/KDE/kdeedu/kstars/kstars/ksfilereader.cpp #857040:857041 @@ -39,6 +39,7 @@ { QIODevice* device = (QIODevice*) & file; QTextStream::setDevice( device ); + QTextStream::setCodec("UTF-8"); m_targetLine = MAXUINT; } @@ -49,6 +50,7 @@ return false; } QTextStream::setDevice( &m_file ); + QTextStream::setCodec("UTF-8"); return true; }