- strcpy(right_name, "CP866");
- } else if (!yaz_matchstr(charsets[i], "uni")) {
- strcpy(right_name, "UTF-8");
- } else {
- strcpy(right_name, charsets[i]);
- }
-
- logf (LOG_LOG, "charset %d %s (right name is %s)", i,
- charsets[i], right_name);
-
- if (odr_set_charset (q->decode, "UTF-8", right_name) == 0)
- {
- odr_set_charset (q->stream, right_name, "UTF-8");
- if (selected)
- zebra_record_encoding (zh, right_name);
+ right_name = "CP866";
+ } else if (!yaz_matchstr(charsets[i], "uni")) {
+ right_name = "UTF-8";
+ } else {
+ right_name = charsets[i];
+ }
+ if (odr_set_charset (q->decode, "UTF-8", right_name) == 0)
+ {
+ yaz_log (LOG_LOG, "charset %d %s (proper name %s): OK", i,
+ charsets[i], right_name);
+ odr_set_charset (q->stream, right_name, "UTF-8");
+ if (selected)
+ zebra_record_encoding (zh, right_name);