| 378 | } |
| 379 | |
| 380 | static int needs_rfc2047_encoding(const char *line, int len) |
| 381 | { |
| 382 | int i; |
| 383 | |
| 384 | for (i = 0; i < len; i++) { |
| 385 | int ch = line[i]; |
| 386 | if (non_ascii(ch) || ch == '\n') |
| 387 | return 1; |
| 388 | if ((i + 1 < len) && (ch == '=' && line[i+1] == '?')) |
| 389 | return 1; |
| 390 | } |
| 391 | |
| 392 | return 0; |
| 393 | } |
| 394 | |
| 395 | static void add_rfc2047(struct strbuf *sb, const char *line, size_t len, |
| 396 | const char *encoding, enum rfc2047_type type) |
no test coverage detected