summaryrefslogtreecommitdiff
path: root/libraries/libvmime-zarafa/zarafa-patches/vmime-unicode-1-1-utf-7-charset.diff
blob: 5014738992ea94ee2a1ed29ecfc65e22911003f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- libvmime-0.7.1/src/charset.cpp	2005-03-18 22:26:46.000000000 +0100
+++ libvmime-0.7.1.patched/src/charset.cpp	2007-04-23 17:08:46.714435000 +0200
@@ -64,6 +64,9 @@
 charset::charset(const string& name)
 	: m_name(name)
 {
+	// if we receive this rfc-1642 valid MIME charset, convert it to something usefull for iconv
+	if (utility::stringUtils::isStringEqualNoCase(m_name, "unicode-1-1-utf-7"))
+		m_name = "utf-7";
 }
 
 
@@ -72,6 +75,10 @@
 {
 	m_name = string(buffer.begin() + position, buffer.begin() + end);
 
+	// if we parsed this rfc-1642 valid MIME charset, convert it to something usefull for iconv
+	if (utility::stringUtils::isStringEqualNoCase(m_name, "unicode-1-1-utf-7"))
+		m_name = "utf-7";
+
 	setParsedBounds(position, end);
 
 	if (newPosition)