@matheusbsbs / matheus-bagliano / commits / 330db18c02
Fork 0

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>

Brandon Casey committed May 18, 2009 at 18:44 UTC 330db18c0277dcfcf322bb61c688acfb5ddf3867
4 files changed +6 -6
builtin-log.c
+1 -1
@@ -619,7 +619,7 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout,
619 struct shortlog log;
620 struct strbuf sb = STRBUF_INIT;
621 int i;
622 - const char *encoding = "utf-8";
622 + const char *encoding = "UTF-8";
623 struct diff_options opts;
624 int need_8bit_cte = 0;
625 struct commit *commit = NULL;
builtin-mailinfo.c
+1 -1
@@ -944,7 +944,7 @@ int cmd_mailinfo(int argc, const char **argv, const char *prefix)
944 */
945 git_config(git_default_config, NULL);
946
947 - def_charset = (git_commit_encoding ? git_commit_encoding : "utf-8");
947 + def_charset = (git_commit_encoding ? git_commit_encoding : "UTF-8");
948 metainfo_charset = def_charset;
949
950 while (1 < argc && argv[1][0] == '-') {
builtin-revert.c
+2 -2
@@ -323,9 +323,9 @@ static int revert_or_cherry_pick(int argc, const char **argv)
323
324 encoding = get_encoding(message);
325 if (!encoding)
326 - encoding = "utf-8";
326 + encoding = "UTF-8";
327 if (!git_commit_encoding)
328 - git_commit_encoding = "utf-8";
328 + git_commit_encoding = "UTF-8";
329 if ((reencoded_message = reencode_string(message,
330 git_commit_encoding, encoding)))
331 message = reencoded_message;
pretty.c
+2 -2
@@ -284,7 +284,7 @@ static char *replace_encoding_header(char *buf, const char *encoding)
284 static char *logmsg_reencode(const struct commit *commit,
285 const char *output_encoding)
286 {
287 - static const char *utf8 = "utf-8";
287 + static const char *utf8 = "UTF-8";
288 const char *use_encoding;
289 char *encoding;
290 char *out;
@@ -881,7 +881,7 @@ char *reencode_commit_message(const struct commit *commit, const char **encoding
881 ? git_log_output_encoding
882 : git_commit_encoding);
883 if (!encoding)
884 - encoding = "utf-8";
884 + encoding = "UTF-8";
885 if (encoding_p)
886 *encoding_p = encoding;
887 return logmsg_reencode(commit, encoding);