Use 'UTF-8' rather than 'utf-8' everywhere for backward compatibility

Some ancient platforms (Solaris 7, IRIX 6.5) do not understand 'utf-8', but
all tested implementations understand 'UTF-8'.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Brandon Casey 2009-05-18 18:44:39 -05:00 committed by Junio C Hamano
parent 5ae93dfdcc
commit 330db18c02
4 changed files with 6 additions and 6 deletions

View File

@ -619,7 +619,7 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout,
struct shortlog log; struct shortlog log;
struct strbuf sb = STRBUF_INIT; struct strbuf sb = STRBUF_INIT;
int i; int i;
const char *encoding = "utf-8"; const char *encoding = "UTF-8";
struct diff_options opts; struct diff_options opts;
int need_8bit_cte = 0; int need_8bit_cte = 0;
struct commit *commit = NULL; struct commit *commit = NULL;

View File

@ -944,7 +944,7 @@ int cmd_mailinfo(int argc, const char **argv, const char *prefix)
*/ */
git_config(git_default_config, NULL); git_config(git_default_config, NULL);
def_charset = (git_commit_encoding ? git_commit_encoding : "utf-8"); def_charset = (git_commit_encoding ? git_commit_encoding : "UTF-8");
metainfo_charset = def_charset; metainfo_charset = def_charset;
while (1 < argc && argv[1][0] == '-') { while (1 < argc && argv[1][0] == '-') {

View File

@ -323,9 +323,9 @@ static int revert_or_cherry_pick(int argc, const char **argv)
encoding = get_encoding(message); encoding = get_encoding(message);
if (!encoding) if (!encoding)
encoding = "utf-8"; encoding = "UTF-8";
if (!git_commit_encoding) if (!git_commit_encoding)
git_commit_encoding = "utf-8"; git_commit_encoding = "UTF-8";
if ((reencoded_message = reencode_string(message, if ((reencoded_message = reencode_string(message,
git_commit_encoding, encoding))) git_commit_encoding, encoding)))
message = reencoded_message; message = reencoded_message;

View File

@ -284,7 +284,7 @@ static char *replace_encoding_header(char *buf, const char *encoding)
static char *logmsg_reencode(const struct commit *commit, static char *logmsg_reencode(const struct commit *commit,
const char *output_encoding) const char *output_encoding)
{ {
static const char *utf8 = "utf-8"; static const char *utf8 = "UTF-8";
const char *use_encoding; const char *use_encoding;
char *encoding; char *encoding;
char *out; char *out;
@ -881,7 +881,7 @@ char *reencode_commit_message(const struct commit *commit, const char **encoding
? git_log_output_encoding ? git_log_output_encoding
: git_commit_encoding); : git_commit_encoding);
if (!encoding) if (!encoding)
encoding = "utf-8"; encoding = "UTF-8";
if (encoding_p) if (encoding_p)
*encoding_p = encoding; *encoding_p = encoding;
return logmsg_reencode(commit, encoding); return logmsg_reencode(commit, encoding);