[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kdepim/proko2/kdepim
From: Till Adam <adam () kde ! org>
Date: 2005-06-02 11:41:54
Message-ID: 1117712514.734026.21995.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 421162 by tilladam:
Don't manually try to force utf8 in the xml loading, but rather set
a proper charset parameter in the content type header of the xml mime
part.
M +1 -0 kmail/kmailicalifaceimpl.cpp
M +1 -5 kresources/kolab/shared/kolabbase.cpp
--- branches/kdepim/proko2/kdepim/kmail/kmailicalifaceimpl.cpp #421161:421162
@@ -291,6 +291,7 @@
const QCString sSubtype = attachmentMimetype.mid( iSlash+1 ).latin1();
msgPart.setTypeStr( sType );
msgPart.setSubtypeStr( sSubtype );
+ msgPart.setParameter( "charset", "utf8" ); // as per spec
QCString ctd("attachment;\n filename=\"");
ctd.append( attachmentName.latin1() );
ctd.append("\"");
--- branches/kdepim/proko2/kdepim/kresources/kolab/shared/kolabbase.cpp #421161:421162
@@ -355,14 +355,10 @@
bool KolabBase::load( const QString& xml )
{
- // This QString is actually in utf-8, but that fails loading in the
- // XML engine, since it won't detect encoding in a QString. So we do this:
- const QString utf8 = QString::fromUtf8( xml.local8Bit() );
-
QString errorMsg;
int errorLine, errorColumn;
QDomDocument document;
- bool ok = document.setContent( utf8, &errorMsg, &errorLine, &errorColumn );
+ bool ok = document.setContent( xml, &errorMsg, &errorLine, &errorColumn );
if ( !ok ) {
qWarning( "Error loading document: %s, line %d, column %d",
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic