From: Adam Dickmeiss Date: Thu, 10 Mar 2011 09:22:53 +0000 (+0100) Subject: Avoid empty strings for yaz_iconv_open X-Git-Tag: v4.1.6~1 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=14ce856a0a41fb7923d62bd173cd4d8e130f02f8 Avoid empty strings for yaz_iconv_open yaz_iconv_open apparently returns a non-null handle in case of to=(null) and from="" .. Avoid we call it this way. This resulted in bad records for Pazpar2 and was introduced in YAZ 4.1.5. --- diff --git a/src/record_render.c b/src/record_render.c index 16351a2..ddfd391 100644 --- a/src/record_render.c +++ b/src/record_render.c @@ -28,7 +28,7 @@ static yaz_iconv_t iconv_create_charset(const char *record_charset, char *from_set1 = 0; char *from_set2 = 0; char *to_set = 0; - if (record_charset) + if (record_charset && *record_charset) { char *cp = charset_buf;