forked from pool/libvmime
2535eddad7
- 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
29 lines
882 B
Diff
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;
|
|
+ }
|
|
+ }
|
|
+
|
|
+ }
|
|
}
|
|
}
|
|
}
|