git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cristian Tibirna <ctibirna@giref.ulaval.ca>
To: git@vger.kernel.org
Subject: fatal: cannot convert from utf8 to UTF-8
Date: Thu, 18 Oct 2012 20:03:26 -0400	[thread overview]
Message-ID: <1532361.Y42DjGJIX1@leto> (raw)


This error:

fatal: cannot convert from utf8 to UTF-8

occured in two distinct situations in our work group with git binaries older 
or equal to 1.7.7. Once during a commit, the other time during a rebase. Both 
occurences are 100% reproductible. But the commit that gives the error during 
a rebase doesn't do so in a cherry-pick.

This is in part our fault: during the standardisation of our git environment, 
we (re)enforced UTF-8 encodings by setting "i18n.commitenconding" and 
"i18n.logOutputEncoding" to "utf8".

It is the "i18n.logOutputEncoding = utf8" that *sometimes* triggers the error 
above.

I know "utf8" is not an accepted denomination ("UTF-8" or "utf-8" should be 
used, according to IANA standards), but we have attenuating circumstances in 
the fact that most things dealing with encoding accept the erroneous name. 
That includes at least iconv(1) and python(1). Thus we ignored that a 
distinction existed and, as self-respecting lazy typers, we preferred the (one 
touch) shorter version.

I wonder if it should be expected that git accepts these name variants ("utf8" 
and "UTF8") as valid and equivalent to the standard ones.

Of course it is very easy for us to work around the error, since setting 
"i18n.logOutputEncoding = utf-8" or removing it altogether from the git config 
file chases the error away. It's only that these kinds of things are bound to 
happen and for a good proportion of git users it might be well opaque, 
difficult to fix and, in drastic (user ignorance-induced) cases, a 
showstopper.

Thanks for listening.

-- 
Cristian Tibirna				(418) 656-2131 / 4340
  Laval University - Québec, CAN ... http://www.giref.ulaval.ca/~ctibirna
  Research professional - GIREF ... ctibirna@giref.ulaval.ca

             reply	other threads:[~2012-10-19  1:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19  0:03 Cristian Tibirna [this message]
2012-10-19  5:50 ` fatal: cannot convert from utf8 to UTF-8 Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1532361.Y42DjGJIX1@leto \
    --to=ctibirna@giref.ulaval.ca \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).