SHA256
1
0
forked from pool/libvmime
libvmime/vmime-mixed-qp-in-parameter.diff
Stephan Kulow 2535eddad7 Accepting request 110162 from devel:libraries:c_c++
- Update to new SVN snapshot rev 603 (ZCP 7.0.6 dependency)
* Set Diffie-Hellman prime size (bug SF#3434852)

OBS-URL: https://build.opensuse.org/request/show/110162
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvmime?expand=0&rev=2
2012-03-22 11:34:38 +00:00

29 lines
882 B
Diff

Index: svn/src/parameter.cpp
===================================================================
--- svn/src/parameter.cpp (revision 597)
+++ svn/src/parameter.cpp (working copy)
@@ -239,8 +239,21 @@
{
value << t.getWholeBuffer();
- if (!foundCharsetChunk)
- ch = t.getWordAt(0)->getCharset();
+ if (!foundCharsetChunk) {
+ // this is still wrong. each word can have it's
+ // own charset, and can be mixed (eg. iso-8859-1
+ // and iso-2022-jp), but very unlikely.
+ // real fix is to have parameters store a
+ // vmime::text in stead of a vmime::word in
+ // m_value. but that changes the interface
+ for (size_t i = 0; i < t.getWordCount(); i++) {
+ if (t.getWordAt(i)->getCharset() != ch && ch == charsets::US_ASCII) {
+ ch = t.getWordAt(i)->getCharset();
+ break;
+ }
+ }
+
+ }
}
}
}