* 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. */
| 421 | * same as UTF16BE. |
| 422 | */ |
| 423 | static 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 | |
| 433 | int is_encoding_utf8(const char *name) |
| 434 | { |
no outgoing calls
no test coverage detected