MCPcopy Index your code
hub / github.com/git/git / same_utf_encoding

Function same_utf_encoding

utf8.c:423–431  ·  view source on GitHub ↗

* Returns true (1) if the src encoding name matches the dst encoding * name directly or one of its alternative names. E.g. UTF-16BE is the * same as UTF16BE. */

Source from the content-addressed store, hash-verified

421 * same as UTF16BE.
422 */
423static int same_utf_encoding(const char *src, const char *dst)
424{
425 if (skip_iprefix(src, "utf", &src) && skip_iprefix(dst, "utf", &dst)) {
426 skip_prefix(src, "-", &src);
427 skip_prefix(dst, "-", &dst);
428 return !strcasecmp(src, dst);
429 }
430 return 0;
431}
432
433int is_encoding_utf8(const char *name)
434{

Callers 5

is_encoding_utf8Function · 0.85
same_encodingFunction · 0.85
reencode_string_lenFunction · 0.85
has_prohibited_utf_bomFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected