/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) 1995-2010 Index Data
* See the file LICENSE for details.
*/
/**
- * \file srwutil.c
- * \brief Implements SRW/SRU utilities.
+ * \file uri.c
+ * \brief Implements URI utilities.
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdlib.h>
#include <yaz/srw.h>
static void encode_uri_char(char *dst, char ch)
{
- if (ch == ' ')
- strcpy(dst, "+");
/* mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")" */
- else if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') ||
- (ch >= '0' && ch <= '9') || strchr("-_.!~*'(|)", ch))
+ if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') ||
+ (ch >= '0' && ch <= '9') || strchr("-_.!~*'(|)", ch))
{
dst[0] = ch;
dst[1] = '\0';