Fake reencoding success under NO_ICONV instead of returning NULL.

git-am when invoked from git-rebase seems to rely on successful conversion.
This commit is contained in:
Johannes Sixt
2007-01-12 16:41:22 +01:00
parent f0ec63a99a
commit 631f6e6249
2 changed files with 7 additions and 4 deletions

7
utf8.c
View File

@@ -353,4 +353,11 @@ char *reencode_string(const char *in, const char *out_encoding, const char *in_e
iconv_close(conv);
return out;
}
#else
char *reencode_string(const char *in, const char *out_encoding, const char *in_encoding)
{
if (!in_encoding)
return NULL;
return xstrdup(in);
}
#endif

4
utf8.h
View File

@@ -7,10 +7,6 @@ int is_encoding_utf8(const char *name);
int print_wrapped_text(const char *text, int indent, int indent2, int len);
#ifndef NO_ICONV
char *reencode_string(const char *in, const char *out_encoding, const char *in_encoding);
#else
#define reencode_string(a,b,c) NULL
#endif
#endif