summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 330db18)
raw | patch | inline | side by side (parent: 330db18)
author | Brandon Casey <casey@nrlssc.navy.mil> | |
Mon, 18 May 2009 23:44:40 +0000 (18:44 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 19 May 2009 03:53:14 +0000 (20:53 -0700) |
When converting between character encodings, git tests whether the "from"
encoding and the "to" encoding have the same name. git should perform this
test case insensitively so that e.g. utf-8 is not seen as a different
encoding than UTF-8.
Additionally, it is not necessary to call tolower() anymore on the encodings
extracted from the mail message.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
encoding and the "to" encoding have the same name. git should perform this
test case insensitively so that e.g. utf-8 is not seen as a different
encoding than UTF-8.
Additionally, it is not necessary to call tolower() anymore on the encodings
extracted from the mail message.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-mailinfo.c | patch | blob | history |
diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index 5ebc8b53cc820933d5098cbbfc77ff49c18b6b85..c68187e2e937704bfa8382950151e78349901345 100644 (file)
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
*content_top = boundary;
boundary = NULL;
}
- if (slurp_attr(line->buf, "charset=", &charset))
- strbuf_tolower(&charset);
+ slurp_attr(line->buf, "charset=", &charset);
if (boundary) {
strbuf_release(boundary);
return;
}
- if (!strcmp(metainfo_charset, charset))
+ if (!strcasecmp(metainfo_charset, charset))
return;
out = reencode_string(line->buf, metainfo_charset, charset);
if (!out)
if (cp + 3 - it->buf > it->len)
goto decode_header_bq_out;
strbuf_add(&charset_q, ep, cp - ep);
- strbuf_tolower(&charset_q);
encoding = cp[1];
if (!encoding || cp[2] != '?')