yaz_iconv_t cd = 0;
char *from_set1 = 0;
char *from_set2 = 0;
- char *to_set = 0;
+ char *to_set = "utf-8";
if (record_charset && *record_charset)
{
char *cp = charset_buf;
}
if (from_set1)
- cd = yaz_iconv_open(to_set ? to_set : "UTF-8", from_set1);
+ cd = yaz_iconv_open(to_set, from_set1);
if (cd2)
{
if (from_set2)
- *cd2 = yaz_iconv_open(to_set ? to_set : "UTF-8", from_set2);
+ *cd2 = yaz_iconv_open(to_set, from_set2);
else
*cd2 = 0;
}
{
size_t j = 0;
i = i + 8; /* skip charset= */
+ while (cp[i] == ' ')
+ i++;
for (j = 0; cp[i] && cp[i] != ';' && cp[i] != ' '; i++)
{
if (j < sizeof(charset)-1)
{
size_t j = 0;
i = i + 7;
+ while (cp[i] == ' ')
+ i++;
for (j = 0; cp[i] && cp[i] != ';' && cp[i] != ' '; i++)
{
if (j < sizeof(format)-1)
{
size_t i0;
i = i + 7;
-
+ while (cp[i] == ' ')
+ i++;
i0 = i;
while (cp[i] && cp[i] != ';')
i++;
if (base64_xpath)
{
char *type_spec = nmem_malloc(nmem,
- strlen(format) + strlen(charset) + 11);
+ strlen(type) + strlen(charset) + 11);
strcpy(type_spec, type);
if (*charset)
{