Allow deprecated ICU definitions again
[pazpar2-moved-to-github.git] / src / pazpar2_config.c
index 4332397..0688b8e 100644 (file)
@@ -639,9 +639,14 @@ static struct conf_service *service_create_static(struct conf_server *server,
                  || !strcmp((const char *) n->name, "facet"))
 
         {
-            yaz_log(YLOG_FATAL, "No longer supported: <%s>", n->name);
-            yaz_log(YLOG_LOG, "Use <icu_chain id=\"%s\">.. instead", n->name);
-            return 0;
+            if (!service->charsets)
+                service->charsets = pp2_charset_fact_create();
+            if (pp2_charset_fact_define(service->charsets, n,
+                                        (const char *) n->name))
+            {
+                yaz_log(YLOG_FATAL, "ICU chain definition error");
+                return 0;
+            }
         }
         else if (!strcmp((const char *) n->name, (const char *) "metadata"))
         {
@@ -937,9 +942,14 @@ static struct conf_server *server_create(struct conf_config *config,
                  || !strcmp((const char *) n->name, "mergekey")
                  || !strcmp((const char *) n->name, "facet"))
         {
-            yaz_log(YLOG_FATAL, "No longer supported: <%s>", n->name);
-            yaz_log(YLOG_LOG, "Use <icu_chain id=\"%s\">.. instead", n->name);
-            return 0;
+            if (!server->charsets)
+                server->charsets = pp2_charset_fact_create();
+            if (pp2_charset_fact_define(server->charsets, n,
+                                        (const char *) n->name))
+            {
+                yaz_log(YLOG_FATAL, "ICU chain definition error");
+                return 0;
+            }
         }
         else if (!strcmp((const char *) n->name, "service"))
         {