summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Varshavchik2017-09-19 20:20:30 -0400
committerSam Varshavchik2017-09-19 20:20:30 -0400
commit9dd2e13aa0e8e3c0068d28e73ffe0a8f8e76ea23 (patch)
tree8a3e141caded03ea7978a9635cb65721d1d6e036
parentecda1daf86eda07e6d315fd2c7be41cf8a6a5781 (diff)
downloadcourier-libs-9dd2e13aa0e8e3c0068d28e73ffe0a8f8e76ea23.tar.bz2
Change default encoding character set to UTF-8.
-rw-r--r--gpglib/list.c2
-rw-r--r--gpglib/testgpg.c4
-rw-r--r--imap/imapd.c2
-rw-r--r--libmail/nntp.C10
-rw-r--r--libmail/rfcaddr.C5
-rw-r--r--maildrop/testsuite.txt.idn6
-rw-r--r--maildrop/testsuite.txt.noidn6
-rw-r--r--rfc2045/configure.ac2
-rw-r--r--rfc2045/makemime.c3
-rw-r--r--rfc2045/rfc2045reply.c4
-rw-r--r--rfc822/rfc2047u.c6
-rw-r--r--sqwebmail/msg2html.c2
-rw-r--r--unicode/unicodetest.c2
13 files changed, 26 insertions, 28 deletions
diff --git a/gpglib/list.c b/gpglib/list.c
index a26faec..4824ca0 100644
--- a/gpglib/list.c
+++ b/gpglib/list.c
@@ -39,7 +39,7 @@ static void definit(struct gpg_list_info *arg)
#define DEFINIT(c, a) if (!(c)) (c)=(a)
- DEFINIT(arg->charset, "iso-8859-1");
+ DEFINIT(arg->charset, "utf-8");
DEFINIT(arg->disabled_msg, "[ This key is disabled ]");
DEFINIT(arg->revoked_msg, "[ This key is revoked ]");
DEFINIT(arg->expired_msg, "[ This key is expired ]");
diff --git a/gpglib/testgpg.c b/gpglib/testgpg.c
index a2178c0..6d266b3 100644
--- a/gpglib/testgpg.c
+++ b/gpglib/testgpg.c
@@ -35,10 +35,10 @@ static int poll_wait(void *dummy)
static void genkey(const char *d)
{
- libmail_gpg_genkey(d, "iso-8859-1",
+ libmail_gpg_genkey(d, "utf-8",
"John Smith",
"john@example.com",
- "Dummy ISO-8859 Tëëst key",
+ "Dummy UTF-8 Tëëst key",
1024,
2048,
12,
diff --git a/imap/imapd.c b/imap/imapd.c
index 93317df..fca7149 100644
--- a/imap/imapd.c
+++ b/imap/imapd.c
@@ -4119,7 +4119,7 @@ static int validate_charset(const char *tag, char **charset)
size_t ucsize;
if (*charset == NULL)
- *charset=my_strdup("ISO-8859-1");
+ *charset=my_strdup("UTF-8");
conv=unicode_convert_tou_init(*charset, &ucptr, &ucsize, 1);
diff --git a/libmail/nntp.C b/libmail/nntp.C
index 3f7d92d..0ef8203 100644
--- a/libmail/nntp.C
+++ b/libmail/nntp.C
@@ -761,7 +761,7 @@ bool mail::nntp::fixGenericMessageNumber(std::string uid, size_t &msgNum)
}
--msgNum;
}
-
+
while (n > index[msgNum].msgNum)
if (++msgNum >= cnt)
{
@@ -1135,8 +1135,8 @@ void mail::nntp::searchMessages(const searchParams &searchInfo,
char *p;
size_t psize;
- h=unicode_convert_fromu_init("iso-8859-1",
- &p, &psize, 1);
+ h=unicode_convert_fromu_init("utf-8",
+ &p, &psize, 1);
if (h)
{
@@ -1314,7 +1314,7 @@ bool mail::nntp::genericCachedUid(string uid)
{
return genericTmpFp && uid == cachedUid;
}
-
+
void mail::nntp::genericGetMessageStruct(string uid,
size_t messageNumber,
struct rfc2045 *&structRet,
@@ -1395,7 +1395,7 @@ void mail::nntp::Task::done()
throw;
}
-
+
myserver=NULL;
delete this;
}
diff --git a/libmail/rfcaddr.C b/libmail/rfcaddr.C
index 082cccb..0f4d39b 100644
--- a/libmail/rfcaddr.C
+++ b/libmail/rfcaddr.C
@@ -163,7 +163,7 @@ string mail::address::getCanonAddress() const
{
a=a.substr(0, n) +
mail::iconvert::convert_tocase(a.substr(n),
- "iso-8859-1",
+ "utf-8",
unicode_lc);
}
@@ -402,7 +402,7 @@ void mail::emailAddress::decode()
for (std::string::iterator b=addr.begin(), e=addr.end(); b != e; ++b)
ucaddr.push_back((unsigned char)*b);
-
+
#if LIBIDN
size_t at=std::find(ucaddr.begin(), ucaddr.end(), '@')
- ucaddr.begin();
@@ -439,4 +439,3 @@ void mail::emailAddress::decode()
decodedName=ucname;
decodedAddr=ucaddr;
}
-
diff --git a/maildrop/testsuite.txt.idn b/maildrop/testsuite.txt.idn
index ef9afb1..63e987e 100644
--- a/maildrop/testsuite.txt.idn
+++ b/maildrop/testsuite.txt.idn
@@ -611,7 +611,7 @@ Action: delivered
Status: 2.0.0
--
-Content-Type: text/rfc822-headers; charset="iso-8859-1"
+Content-Type: text/rfc822-headers; charset="utf-8"
Content-Disposition: attachment
Content-Transfer-Encoding: 8bit
@@ -652,7 +652,7 @@ Source-Ip: 127.0.0.1
Incidents: 2
--
-Content-Type: text/rfc822-headers; charset="iso-8859-1"
+Content-Type: text/rfc822-headers; charset="utf-8"
Content-Disposition: attachment
Content-Transfer-Encoding: 8bit
@@ -692,7 +692,7 @@ Source-Ip: 127.0.0.1
Incidents: 2
--
-Content-Type: text/rfc822-headers; charset="iso-8859-1"
+Content-Type: text/rfc822-headers; charset="utf-8"
Content-Disposition: attachment
Content-Transfer-Encoding: 8bit
diff --git a/maildrop/testsuite.txt.noidn b/maildrop/testsuite.txt.noidn
index b97a4e8..562ade4 100644
--- a/maildrop/testsuite.txt.noidn
+++ b/maildrop/testsuite.txt.noidn
@@ -611,7 +611,7 @@ Action: delivered
Status: 2.0.0
--
-Content-Type: text/rfc822-headers; charset="iso-8859-1"
+Content-Type: text/rfc822-headers; charset="utf-8"
Content-Disposition: attachment
Content-Transfer-Encoding: 8bit
@@ -652,7 +652,7 @@ Source-Ip: 127.0.0.1
Incidents: 2
--
-Content-Type: text/rfc822-headers; charset="iso-8859-1"
+Content-Type: text/rfc822-headers; charset="utf-8"
Content-Disposition: attachment
Content-Transfer-Encoding: 8bit
@@ -692,7 +692,7 @@ Source-Ip: 127.0.0.1
Incidents: 2
--
-Content-Type: text/rfc822-headers; charset="iso-8859-1"
+Content-Type: text/rfc822-headers; charset="utf-8"
Content-Disposition: attachment
Content-Transfer-Encoding: 8bit
diff --git a/rfc2045/configure.ac b/rfc2045/configure.ac
index 1377e75..2957ed2 100644
--- a/rfc2045/configure.ac
+++ b/rfc2045/configure.ac
@@ -79,7 +79,7 @@ AC_DEFINE_UNQUOTED(RFC2045VER,"$version", [ Package that uses librfc2045.a ])
AC_ARG_ENABLE(mimecharset,
[ --enable-mimecharset=charset Default MIME charset to set on new messages],
- RFC2045CHARSET="$enableval", RFC2045CHARSET="iso-8859-1")
+ RFC2045CHARSET="$enableval", RFC2045CHARSET="utf-8")
CFLAGS="$CFLAGS -I.. -I${srcdir}/.."
CXXFLAGS="$CXXFLAGS -I.. -I${srcdir}/.."
diff --git a/rfc2045/makemime.c b/rfc2045/makemime.c
index e535556..89d8dbc 100644
--- a/rfc2045/makemime.c
+++ b/rfc2045/makemime.c
@@ -762,7 +762,7 @@ const char *orig_charset=m->textplaincharset;
if (m->contentname && *m->contentname)
{
const char *chset=m->textplaincharset ? m->textplaincharset
- : "iso-8859-1";
+ : "utf-8";
rfc2231_attrCreate("name", m->contentname, chset, NULL,
do_printRfc2231Attr, m);
@@ -1108,4 +1108,3 @@ static void opencreatemultipartmime(struct mimestruct *m)
m->inputfp1=openfile_or_pipe(m->inputfile1, "r");
openoutput(m);
}
-
diff --git a/rfc2045/rfc2045reply.c b/rfc2045/rfc2045reply.c
index da0d981..d145d06 100644
--- a/rfc2045/rfc2045reply.c
+++ b/rfc2045/rfc2045reply.c
@@ -780,7 +780,7 @@ static int mkforward(struct rfc2045_mkreplyinfo *ri)
char *p=rfc2047_encode_str(ri->forwarddescr,
ri->charset ?
ri->charset
- : "iso-8859-1",
+ : "utf-8",
rfc2047_qp_allow_any
);
@@ -1525,7 +1525,7 @@ static void copyheaders(struct rfc2045_mkreplyinfo *ri)
char *header, *value;
- writes(ri, "\nContent-Type: text/rfc822-headers; charset=\"iso-8859-1\"\n"
+ writes(ri, "\nContent-Type: text/rfc822-headers; charset=\"utf-8\"\n"
"Content-Disposition: attachment\n"
"Content-Transfer-Encoding: 8bit\n\n"
);
diff --git a/rfc822/rfc2047u.c b/rfc822/rfc2047u.c
index 9966faf..5a3bb85 100644
--- a/rfc822/rfc2047u.c
+++ b/rfc822/rfc2047u.c
@@ -131,7 +131,7 @@ int rfc822_display_name_int(const struct rfc822a *rfcp, int index,
if (chset == NULL)
{
- s.chset="iso-8859-1";
+ s.chset="utf-8";
}
else
{
@@ -991,7 +991,7 @@ int rfc2047_decoder(const char *text,
}
if (i)
- (*callback)("iso-8859-1", "", text, i, ptr);
+ (*callback)("utf-8", "", text, i, ptr);
text += i;
@@ -1006,7 +1006,7 @@ int rfc2047_decoder(const char *text,
if (rc == 0)
{
- (*callback)("iso-8859-1", "", text, 2, ptr);
+ (*callback)("utf-8", "", text, 2, ptr);
text += 2;
continue;
}
diff --git a/sqwebmail/msg2html.c b/sqwebmail/msg2html.c
index 80387ac..137cbae 100644
--- a/sqwebmail/msg2html.c
+++ b/sqwebmail/msg2html.c
@@ -548,7 +548,7 @@ off_t pos;
else
showmsgrfc822_header(info->output_character_set,
value,
- "iso-8859-1");
+ "utf-8");
printf("</span></td></tr>\n");
free(header);
continue;
diff --git a/unicode/unicodetest.c b/unicode/unicodetest.c
index b59fab3..08f0b41 100644
--- a/unicode/unicodetest.c
+++ b/unicode/unicodetest.c
@@ -47,7 +47,7 @@ static void test1()
cb.cnt=0;
cb.size=sizeof(outputbuf);
- if ((h=unicode_convert_init("UCS-4BE", "ISO-8859-1",
+ if ((h=unicode_convert_init("UCS-4BE", "UTF-8",
save_output, &cb)) == NULL)
{
perror("unicode_convert_init");