charset-utf8.c revision d5cebe7f98e63d4e2822863ef2faa4971e8b3a5d
/* Copyright (C) 2002 Timo Sirainen */
#include "lib.h"
#include "buffer.h"
#include "charset-utf8.h"
#include <ctype.h>
{
char *destbuf;
size_t i;
for (i = 0; i < src_size; i++)
}
{
if (utf8_size_r != NULL)
return buffer_free_without_data(dest);
}
#ifndef HAVE_ICONV
#include <ctype.h>
struct charset_translation {
int dummy;
};
bool *unknown_charset)
{
if (unknown_charset != NULL)
*unknown_charset = FALSE;
return &ascii_translation;
return &utf8_translation;
/* no support for charsets that need translation */
if (unknown_charset != NULL)
*unknown_charset = TRUE;
return NULL;
}
{
}
{
}
enum charset_result
{
/* no translation needed - just copy it to outbuf uppercased */
return CHARSET_RET_OK;
}
const char *
{
if (unknown_charset != NULL)
*unknown_charset = FALSE;
if (utf8_size_r != NULL)
*utf8_size_r = size;
} else {
if (unknown_charset != NULL)
*unknown_charset = TRUE;
return NULL;
}
}
const char *
{
if (unknown_charset != NULL)
*unknown_charset = FALSE;
} else {
if (unknown_charset != NULL)
*unknown_charset = TRUE;
return NULL;
}
}
#endif