MARC-8: allow all characters 0x01-0x20 YAZ-650
[yaz-moved-to-github.git] / src / iconv_decode_marc8.c
index c20c3e9..86f1246 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2012 Index Data
+ * Copyright (C) 1995-2013 Index Data
  * See the file LICENSE for details.
  */
 /**
  * See the file LICENSE for details.
  */
 /**
@@ -172,10 +172,10 @@ static unsigned long yaz_read_marc8_comb(yaz_iconv_t cd,
     }
     if (inbytesleft == 0)
         return 0;
     }
     if (inbytesleft == 0)
         return 0;
-    else if (*inp == ' ')
+    else if (*inp <= ' ')
     {
         *no_read += 1;
     {
         *no_read += 1;
-        return ' ';
+        return *inp;
     }
     else
     {
     }
     else
     {