git/builtin
Junio C Hamano 0e18bcd5e9 reencode_string(): introduce and use same_encoding()
Callers of reencode_string() that re-encodes a string from one
encoding to another all used ad-hoc way to bypass the case where the
input and the output encodings are the same.  Some did strcmp(),
some did strcasecmp(), yet some others when converting to UTF-8 used
is_encoding_utf8().

Introduce same_encoding() helper function to make these callers use
the same logic.  Notably, is_encoding_utf8() has a work-around for
common misconfiguration to use "utf8" to name UTF-8 encoding, which
does not match "UTF-8" hence strcasecmp() would not consider the
same.  Make use of it in this helper function.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-04 08:10:33 -05:00
..
2012-09-12 14:08:05 -07:00
2012-09-11 11:23:54 -07:00
2012-04-18 16:17:42 -07:00
2012-07-09 09:02:19 -07:00
2011-03-22 10:16:54 -07:00
2011-03-22 10:16:54 -07:00
2011-12-28 11:32:36 -08:00
2011-12-22 11:27:26 -08:00
2011-03-22 10:16:54 -07:00
2011-03-22 10:16:54 -07:00
2011-03-22 11:43:27 -07:00
2011-03-22 10:16:54 -07:00
2012-07-22 12:55:07 -07:00
2011-03-09 23:52:56 -08:00
2011-05-31 12:19:11 -07:00
2011-03-22 10:16:54 -07:00
2011-08-25 14:42:11 -07:00